From 730f36cd8be7516484ccb3bd804a5bf4b248da15 Mon Sep 17 00:00:00 2001 From: Junjun2016 Date: Sat, 11 Sep 2021 14:34:35 +0800 Subject: [PATCH] [Fix] Update mmcv installation in dockerfile (#860) * update dockerfile * Update docker/Dockerfile Co-authored-by: Jerry Jiarui XU * add ARG * change dash to bash Co-authored-by: Jerry Jiarui XU --- docker/Dockerfile | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 7481b3a96..a55c685de 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,6 +1,7 @@ ARG PYTORCH="1.6.0" ARG CUDA="10.1" ARG CUDNN="7" +ARG MMCV="1.3.12" FROM pytorch/pytorch:${PYTORCH}-cuda${CUDA}-cudnn${CUDNN}-devel @@ -12,11 +13,17 @@ RUN apt-get update && apt-get install -y git ninja-build libglib2.0-0 libsm6 lib && apt-get clean \ && rm -rf /var/lib/apt/lists/* -# Install mmsegmentation RUN conda clean --all -RUN pip install mmcv-full==latest+torch1.6.0+cu101 -f https://download.openmmlab.com/mmcv/dist/index.html +# Install MMCV +ARG PYTORCH +ARG CUDA +ARG MMCV +RUN ["/bin/bash", "-c", "pip install mmcv-full==${MMCV} -f https://download.openmmlab.com/mmcv/dist/cu${CUDA//./}/torch${PYTORCH}/index.html"] + +# Install MMSegmentation RUN git clone https://github.com/open-mmlab/mmsegmentation.git /mmsegmentation WORKDIR /mmsegmentation +ENV FORCE_CUDA="1" RUN pip install -r requirements.txt RUN pip install --no-cache-dir -e .