1. Set Up Python Environment
Using venv:Contents
bash
KopiërenBewerken
python3 -m venv nerfstudio-env
source nerfstudio-env/bin/activate # On Windows: nerfstudio-env\Scripts\activate
Using conda:
bash
KopiërenBewerken
conda create --name nerfstudio-env python=3.8
conda activate nerfstudio-env
2. Install PyTorch
Install PyTorch compatible with your CUDA version.Contents
Linux:
bash
KopiërenBewerken
pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu116
Windows:Contents
bash
KopiërenBewerken
pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu116
Replace cu116 with your specific CUDA version if different.
3. Install Tiny-CUDA-NN
Install the tiny-cuda-nn library, which provides efficient neural network primitives for CUDA.Contents
Linux:
bash
KopiërenBewerken
pip install git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch
Windows:
bash
KopiërenBewerken
set TCNN_CUDA_ARCHITECTURES=86 # Replace with your GPU's architecture code
pip install git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch
Determine your GPU's architecture code from NVIDIA's official list.Contents
4. Clone and Install Nerfstudio
Clone the Nerfstudio repository and install its dependencies.Contents
bash
KopiërenBewerken
git clone https://github.com/nerfstudio-project/nerfstudio.git
cd nerfstudio
pip install -e .
7. Verify Installation
Run the following command to check if Nerfstudio is installed correctly:
bash
KopiërenBewerken
ns-train --help
If the installation is successful, this command will display the help message for the ns-train command.Contents
5. Install Additional Dependencies (Optional)
TensorBoard:
bash
KopiërenBewerken
pip install tensorboard
Weights & Biases:
bash
KopiërenBewerken
pip install wandb
6. Common Installation Issues and Solutions
_C:
tiny-cuda-nn with the correct architecture code.Contents