diff --git a/docker/Dockerfile b/docker/Dockerfile index 7481b3a969..a55c685de2 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 .