Skip to content

Commit 99242ec

Browse files
tindzkfacebook-github-bot
authored andcommittedSep 23, 2020
Dockerfile: Support CUDA 11 (pytorch#45071)
Summary: Although PyTorch already supports CUDA 11, the Dockerfile still relies on CUDA 10. This pull request upgrades all the necessary versions such that recent NVIDIA GPUs like A100 can be used. Pull Request resolved: pytorch#45071 Reviewed By: ezyang Differential Revision: D23873224 Pulled By: seemethere fbshipit-source-id: 822c25f183dcc3b4c5b780c00cd37744d34c6e00
1 parent 4d80c8c commit 99242ec

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed
 

‎Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@ WORKDIR /opt/pytorch
4444
COPY --from=conda /opt/conda /opt/conda
4545
COPY --from=submodule-update /opt/pytorch /opt/pytorch
4646
RUN --mount=type=cache,target=/opt/ccache \
47-
TORCH_CUDA_ARCH_LIST="3.5 5.2 6.0 6.1 7.0+PTX" TORCH_NVCC_FLAGS="-Xfatbin -compress-all" \
47+
TORCH_CUDA_ARCH_LIST="3.5 5.2 6.0 6.1 7.0+PTX 8.0" TORCH_NVCC_FLAGS="-Xfatbin -compress-all" \
4848
CMAKE_PREFIX_PATH="$(dirname $(which conda))/../" \
4949
python setup.py install
5050

5151
FROM conda as conda-installs
5252
ARG INSTALL_CHANNEL=pytorch-nightly
53-
RUN /opt/conda/bin/conda install -c "${INSTALL_CHANNEL}" -y pytorch torchvision cudatoolkit=10.1 && \
53+
RUN /opt/conda/bin/conda install -c "${INSTALL_CHANNEL}" -y pytorch torchvision cudatoolkit=11.0.221 && \
5454
/opt/conda/bin/conda clean -ya
5555

5656
FROM ${BASE_IMAGE} as official

‎docker.Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ DOCKER_ORG = $(shell whoami)
99
endif
1010

1111
BASE_RUNTIME = ubuntu:18.04
12-
BASE_DEVEL = nvidia/cuda:10.1-cudnn7-devel-ubuntu18.04
12+
BASE_DEVEL = nvidia/cuda:11.0-cudnn8-devel-ubuntu18.04
1313

1414
# The conda channel to use to install pytorch / torchvision
1515
INSTALL_CHANNEL = pytorch

0 commit comments

Comments
 (0)
Please sign in to comment.