Skip to content

Commit 56e18ba

Browse files
Junjun2016xvjiarui
andauthored
[Fix] Update mmcv installation in dockerfile (open-mmlab#860)
* update dockerfile * Update docker/Dockerfile Co-authored-by: Jerry Jiarui XU <[email protected]> * add ARG * change dash to bash Co-authored-by: Jerry Jiarui XU <[email protected]>
1 parent c4c2fdc commit 56e18ba

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

docker/Dockerfile

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
ARG PYTORCH="1.6.0"
22
ARG CUDA="10.1"
33
ARG CUDNN="7"
4+
ARG MMCV="1.3.12"
45

56
FROM pytorch/pytorch:${PYTORCH}-cuda${CUDA}-cudnn${CUDNN}-devel
67

@@ -12,11 +13,17 @@ RUN apt-get update && apt-get install -y git ninja-build libglib2.0-0 libsm6 lib
1213
&& apt-get clean \
1314
&& rm -rf /var/lib/apt/lists/*
1415

15-
# Install mmsegmentation
1616
RUN conda clean --all
1717

18-
RUN pip install mmcv-full==latest+torch1.6.0+cu101 -f https://download.openmmlab.com/mmcv/dist/index.html
18+
# Install MMCV
19+
ARG PYTORCH
20+
ARG CUDA
21+
ARG MMCV
22+
RUN ["/bin/bash", "-c", "pip install mmcv-full==${MMCV} -f https://download.openmmlab.com/mmcv/dist/cu${CUDA//./}/torch${PYTORCH}/index.html"]
23+
24+
# Install MMSegmentation
1925
RUN git clone https://github.com/open-mmlab/mmsegmentation.git /mmsegmentation
2026
WORKDIR /mmsegmentation
27+
ENV FORCE_CUDA="1"
2128
RUN pip install -r requirements.txt
2229
RUN pip install --no-cache-dir -e .

0 commit comments

Comments
 (0)