-
-
Save paularamo/0cb692fe0a8ce539d8db4ca6a718e54f to your computer and use it in GitHub Desktop.
gaussian_splatting_setup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Installing and Running 3D Gaussian Splatting on Linux | |
| # Pipeline running by Paula Ramos https://www.linkedin.com/in/paula-ramos-phd/ | |
| # 1. System Requirements | |
| # Ensure you have: | |
| # - Ubuntu 22.04+ | |
| # - NVIDIA GPU (RTX 3000/4000 series recommended) | |
| # - NVIDIA Driver 535+ | |
| # - CUDA 12.2 installed | |
| # - Python 3.10+ | |
| # 2. Install System Dependencies | |
| sudo apt update && sudo apt upgrade -y | |
| sudo apt install -y git cmake libxmu-dev libxi-dev libgl-dev libomp-dev \ | |
| python3-dev python3-venv python3-pip \ | |
| ninja build-essential | |
| # Clone the Repository & Set Up Virtual Environment | |
| git clone https://github.com/graphdeco-inria/gaussian-splatting.git | |
| cd gaussian-splatting | |
| # Create and activate a virtual environment | |
| python3 -m venv gs_env | |
| source gs_env/bin/activate | |
| # Upgrade pip | |
| pip install --upgrade pip | |
| # Install PyTorch with CUDA 12.1+ | |
| pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121 | |
| # Verify installation | |
| python -c "import torch; print(torch.__version__); print(torch.cuda.is_available()); print(torch.cuda.get_device_name(0))" | |
| # Install Gaussian Splatting Dependencies | |
| # https://github.com/graphdeco-inria/gaussian-splatting/blob/main/environment.yml | |
| # Carefull with the versions of Cuda and Torch | |
| pip install -r requirements.txt | |
| # Initialize Git Submodules | |
| git submodule update --init --recursive | |
| # Install required submodules | |
| pip install ./submodules/diff-gaussian-rasterization | |
| pip install ./submodules/simple-knn | |
| pip install ./submodules/fused-ssim | |
| # Fix Common Build Errors | |
| # Missing Python Development Headers (`Python.h` not found) | |
| sudo apt install -y python3.10-dev python3-dev | |
| # CUDA Compilation Issues (`TORCH_CUDA_ARCH_LIST` Not Set) | |
| export TORCH_CUDA_ARCH_LIST="8.6 8.9+PTX" | |
| echo 'export TORCH_CUDA_ARCH_LIST="8.6 8.9+PTX"' >> ~/.bashrc | |
| source ~/.bashrc | |
| # Ensure CUDA 12.2 is Used | |
| export PATH=/usr/local/cuda-12.2/bin:$PATH | |
| export LD_LIBRARY_PATH=/usr/local/cuda-12.2/lib64:$LD_LIBRARY_PATH | |
| echo 'export PATH=/usr/local/cuda-12.2/bin:$PATH' >> ~/.bashrc | |
| echo 'export LD_LIBRARY_PATH=/usr/local/cuda-12.2/lib64:$LD_LIBRARY_PATH' >> ~/.bashrc | |
| source ~/.bashrc | |
| # Run Gaussian Splatting | |
| python train.py --config configs/sample.json | |
| python render.py --config configs/sample.json | |
| # Verify Everything | |
| nvidia-smi | |
| nvcc --version | |
| python -c "import torch; print(torch.__version__); print(torch.cuda.is_available())" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment