Skip to content

Commit 9966c43

Browse files
ZunhammerNicolas Zunhammertancik
authored
[Fix] Docker not supporting older CUDA architectures (#1328)
Fix docker not supporting older CUDA architectures. Co-authored-by: Nicolas Zunhammer <[email protected]> Co-authored-by: Matthew Tancik <[email protected]>
1 parent 11e7fa8 commit 9966c43

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

Dockerfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ ENV DEBIAN_FRONTEND=noninteractive
77
## Set timezone as it is required by some packages.
88
ENV TZ=Europe/Berlin
99
## CUDA architectures, required by tiny-cuda-nn.
10-
ENV TCNN_CUDA_ARCHITECTURES=86
10+
## NOTE: All commonly used GPU architectures are included and supported here. To speedup the image build process remove all architectures but the one of your explicit GPU. Find details here: https://developer.nvidia.com/cuda-gpus (8.6 translates to 86 in the line below) or in the docs.
11+
ENV TCNN_CUDA_ARCHITECTURES=90;89;86;80;75;70;61;52;37
1112
## CUDA Home, required to find CUDA in some packages.
1213
ENV CUDA_HOME="/usr/local/cuda"
1314

docs/quickstart/installation.md

+17-2
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,28 @@ docker run --gpus all -v /folder/of/your/data:/workspace/ -v /home/<YOUR_USER>/.
9595
```
9696
### Note
9797
- The container works on Linux and Windows, depending on your OS some additional setup steps might be required to provide access to your GPU inside containers.
98-
- Paths on Windows use backslash '\\\\' while unix based systems use a frontslash '/' for paths, where backslashes might require an escape character depending on where they are used (e.g. C:\\\\folder1\\\\folder2...). Ensure to use the correct paths when mounting folders or providing paths as parameters.
98+
- Paths on Windows use backslash '\\' while unix based systems use a frontslash '/' for paths, where backslashes might require an escape character depending on where they are used (e.g. C:\\\\folder1\\\\folder2...). Alternatively, mounts can be quoted (e.g. ```-v 'C:\local_folder:/docker_folder'```). Ensure to use the correct paths when mounting folders or providing paths as parameters.
99+
- Always use full paths, relative paths are known to create issues when being used in mounts into docker.
99100
- Everything inside the container, what is not in a mounted folder (workspace in the above example), will be permanently removed after destroying the container. Always do all your tasks and output folder in workdir!
100101
- The user inside the container is called 'user' and is mapped to the local user with ID 1000 (usually the first non-root user on Linux systems).
101102
- The container currently is based on nvidia/cuda:11.7.1-devel-ubuntu22.04, consequently it comes with CUDA 11.7 which must be supported by the nvidia driver. No local CUDA installation is required or will be affected by using the docker image.
102103
- The docker image (respectively Ubuntu 22.04) comes with Python3.10, no older version of Python is installed.
103104
- If you call the container with commands directly, you still might want to add the interactive terminal ('-it') flag to get live log outputs of the nerfstudio scripts. In case the container is used in an automated environment the flag should be discarded.
104-
105+
- The current version of docker is built for multi-architecture (CUDA architectures) use. The target architecture must be defined at build time for tinyCUDNN to be able to compile properly. If your GPU architecture is not covered by the following table you need to replace the number in the line ```ENV TCNN_CUDA_ARCHITECTURES=90;89;86;80;75;70;61;52;37``` to you specific architecture. It also is a good idea to remove all architectures but yours (e.g. ```ENV TCNN_CUDA_ARCHITECTURES=86```) to speedup the docker build a lot.
106+
107+
**Currently supported CUDA architectures in the docker image**
108+
109+
GPU | CUDA arch
110+
-- | --
111+
H100 | 90
112+
40X0 | 89
113+
30X0 | 86
114+
A100 | 80
115+
20X0 | 75
116+
TITAN V / V100 | 70
117+
10X0 / TITAN Xp | 61
118+
9X0 | 52
119+
K80 | 37
105120

106121
## Installation FAQ
107122

0 commit comments

Comments
 (0)