From 6394679328e0c8344bf494c85bb5a08fa5cacc87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20M=C3=A9ndez?= Date: Thu, 5 Aug 2021 14:09:33 +0200 Subject: [PATCH] [Enhancement] Add mmcv arg expansion (#748) * Add dynamic mmcv install * Declare ARG after FROM --- docker/serve/Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docker/serve/Dockerfile b/docker/serve/Dockerfile index b9c5589..5b71998 100644 --- a/docker/serve/Dockerfile +++ b/docker/serve/Dockerfile @@ -24,7 +24,9 @@ RUN export FORCE_CUDA=1 RUN pip install torchserve torch-model-archiver # MMLAB -RUN pip install mmcv-full==${MMCV} -f https://download.openmmlab.com/mmcv/dist/cu101/torch1.6.0/index.html +ARG PYTORCH +ARG CUDA +RUN ["/bin/bash", "-c", "pip install mmcv-full==${MMCV} -f https://download.openmmlab.com/mmcv/dist/cu${CUDA//./}/torch${PYTORCH}/index.html"] RUN pip install mmsegmentation==${MMSEG} RUN useradd -m model-server \