Skip to content

Commit a87b892

Browse files
authored
[Fix] Add GPG keys and del mmcv version in Dockerfile (open-mmlab#1534)
1 parent b26b8e0 commit a87b892

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

docker/Dockerfile

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,28 @@
11
ARG PYTORCH="1.11.0"
22
ARG CUDA="11.3"
33
ARG CUDNN="8"
4-
ARG MMCV="1.4.8"
54

65
FROM pytorch/pytorch:${PYTORCH}-cuda${CUDA}-cudnn${CUDNN}-devel
76

87
ENV TORCH_CUDA_ARCH_LIST="6.0 6.1 7.0+PTX"
98
ENV TORCH_NVCC_FLAGS="-Xfatbin -compress-all"
109
ENV CMAKE_PREFIX_PATH="$(dirname $(which conda))/../"
1110

11+
# To fix GPG key error when running apt-get update
12+
RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub
13+
RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub
14+
1215
RUN apt-get update && apt-get install -y git ninja-build libglib2.0-0 libsm6 libxrender-dev libxext6 \
13-
&& apt-get clean \
14-
&& rm -rf /var/lib/apt/lists/*
16+
&& apt-get clean \
17+
&& rm -rf /var/lib/apt/lists/*
1518

1619
RUN conda clean --all
1720

1821
# Install MMCV
1922
ARG PYTORCH
2023
ARG CUDA
2124
ARG MMCV
22-
RUN ["/bin/bash", "-c", "pip install --no-cache-dir mmcv-full==${MMCV} -f https://download.openmmlab.com/mmcv/dist/cu${CUDA//./}/torch${PYTORCH}/index.html"]
25+
RUN ["/bin/bash", "-c", "pip install --no-cache-dir mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu${CUDA//./}/torch${PYTORCH}/index.html"]
2326

2427
# Install MMSegmentation
2528
RUN git clone https://github.com/open-mmlab/mmsegmentation.git /mmsegmentation

0 commit comments

Comments
 (0)