Skip to content

Commit

Permalink
[Fix] Update mmcv installation in dockerfile (#860)
Browse files Browse the repository at this point in the history
* update dockerfile

* Update docker/Dockerfile

Co-authored-by: Jerry Jiarui XU <xvjiarui0826@gmail.com>

* add ARG

* change dash to bash

Co-authored-by: Jerry Jiarui XU <xvjiarui0826@gmail.com>
  • Loading branch information
Junjun2016 and xvjiarui committed Sep 11, 2021
1 parent c4c2fdc commit 56e18ba
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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 .

0 comments on commit 56e18ba

Please sign in to comment.