More robust install instructions (#2277)

Add cuda-toolkit install to readme/docs
This commit is contained in:
Brent Yi authored and GitHub committed 2023-08-01 20:35:22 +00:00
1 parent 98d36ed7d9
commit dab39c25b4
2 files changed
+29 -21

No files matched your search

+7 -2
View File
@@ -92,17 +92,20 @@ Nerfstudio requires `python >= 3.8`. We recommend using conda to manage dependen
```bash ```bash
conda create --name nerfstudio -y python=3.8 conda create --name nerfstudio -y python=3.8
conda activate nerfstudio conda activate nerfstudio
python -m pip install --upgrade pip pip install --upgrade pip
``` ```
### Dependencies ### Dependencies
Install pytorch with CUDA (this repo has been tested with CUDA 11.7 and CUDA 11.8) and [tiny-cuda-nn](https://github.com/NVlabs/tiny-cuda-nn) Install PyTorch with CUDA (this repo has been tested with CUDA 11.7 and CUDA 11.8) and [tiny-cuda-nn](https://github.com/NVlabs/tiny-cuda-nn).
`cuda-toolkit` is required for building `tiny-cuda-nn`.
For CUDA 11.7: For CUDA 11.7:
```bash ```bash
pip install torch==2.0.1+cu117 torchvision==0.15.2+cu117 --extra-index-url https://download.pytorch.org/whl/cu117 pip install torch==2.0.1+cu117 torchvision==0.15.2+cu117 --extra-index-url https://download.pytorch.org/whl/cu117
conda install -c "nvidia/label/cuda-11.7.1" cuda-toolkit
pip install ninja git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch pip install ninja git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch
``` ```
@@ -110,6 +113,8 @@ For CUDA 11.8:
```bash ```bash
pip install torch==2.0.1+cu118 torchvision==0.15.2+cu118 --extra-index-url https://download.pytorch.org/whl/cu118 pip install torch==2.0.1+cu118 torchvision==0.15.2+cu118 --extra-index-url https://download.pytorch.org/whl/cu118
conda install -c "nvidia/label/cuda-11.8.0" cuda-toolkit
pip install ninja git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch pip install ninja git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch
``` ```
+22 -19
View File
@@ -33,44 +33,47 @@ python -m pip install --upgrade pip
(pytorch)= (pytorch)=
### pytorch ### PyTorch
::::{tab-set} Note that if a PyTorch version prior to 2.0.1 is installed,
:::{tab-item} Torch 2.0.1 with CUDA 11.8
- To install 2.0.1 with CUDA 11.8:
Note that if a pytorch version prior to 2.0.1 is installed,
the previous version of pytorch, functorch, and tiny-cuda-nn should be uninstalled. the previous version of pytorch, functorch, and tiny-cuda-nn should be uninstalled.
```bash ```bash
pip uninstall torch torchvision functorch tinycudann pip uninstall torch torchvision functorch tinycudann
``` ```
Install pytorch 2.0.1 with CUDA and [tiny-cuda-nn](https://github.com/NVlabs/tiny-cuda-nn) ::::{tab-set}
:::{tab-item} Torch 2.0.1 with CUDA 11.8
Install PyTorch 2.0.1 with CUDA 11.8:
```bash ```bash
pip install torch==2.0.1+cu118 torchvision==0.15.2+cu118 --extra-index-url https://download.pytorch.org/whl/cu118 pip install torch==2.0.1+cu118 torchvision==0.15.2+cu118 --extra-index-url https://download.pytorch.org/whl/cu118
``` ```
To build the necessary CUDA extensions, `cuda-toolkit` is also required. We
recommend installing with conda:
```bash
conda install -c "nvidia/label/cuda-11.7.1" cuda-toolkit
```
::: :::
:::{tab-item} Torch 2.0.1 with CUDA 11.7 :::{tab-item} Torch 2.0.1 with CUDA 11.7
- To install 2.0.1 with CUDA 11.7: Install PyTorch 2.0.1 with CUDA 11.7:
Note that if a pytorch version prior to 2.0.1 is installed,
the previous version of pytorch, functorch, and tiny-cuda-nn should be uninstalled.
```bash
pip uninstall torch torchvision functorch tinycudann
```
Install pytorch 2.0.1 with CUDA and [tiny-cuda-nn](https://github.com/NVlabs/tiny-cuda-nn)
```bash ```bash
pip install torch==2.0.1+cu117 torchvision==0.15.2+cu117 --extra-index-url https://download.pytorch.org/whl/cu117 pip install torch==2.0.1+cu117 torchvision==0.15.2+cu117 --extra-index-url https://download.pytorch.org/whl/cu117
``` ```
To build the necessary CUDA extensions, `cuda-toolkit` is also required. We
recommend installing with conda:
```bash
conda install -c "nvidia/label/cuda-11.8.0" cuda-toolkit
```
::: :::
:::: ::::
@@ -258,7 +261,7 @@ While installing tiny-cuda, you run into: `The detected CUDA version mismatches
**Solution**: **Solution**:
Reinstall pytorch with the correct CUDA version. Reinstall PyTorch with the correct CUDA version.
See [pytorch](pytorch) under Dependencies, above. See [pytorch](pytorch) under Dependencies, above.
<br /> <br />