File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,15 @@ RUN curl -fsSL -v -o ~/miniconda.sh -O https://repo.anaconda.com/miniconda/Mini
44
44
/opt/conda/bin/conda install -y python=${PYTHON_VERSION} conda-build pyyaml numpy ipython cython typing typing_extensions mkl mkl-include ninja && \
45
45
/opt/conda/bin/conda clean -ya
46
46
47
+ # ## change the pip source for installing packages
48
+ RUN if [ ${USE_SRC_INSIDE} == true ] ; \
49
+ then \
50
+ /opt/conda/bin/pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple; \
51
+ echo "pip using tsinghua source" ; \
52
+ else \
53
+ echo "Keep pip the download source unchanged" ; \
54
+ fi
55
+
47
56
# ## pytorch mmcv onnxruntime and openvino
48
57
RUN /opt/conda/bin/pip install torch==${TORCH_VERSION}+cpu torchvision==${TORCHVISION_VERSION}+cpu -f https://download.pytorch.org/whl/cpu/torch_stable.html \
49
58
&& /opt/conda/bin/pip install --no-cache-dir openmim
Original file line number Diff line number Diff line change @@ -35,11 +35,19 @@ RUN curl -fsSL -v -o ~/miniconda.sh -O https://repo.anaconda.com/miniconda/Mini
35
35
/opt/conda/bin/conda install -y python=${PYTHON_VERSION} conda-build pyyaml numpy ipython cython typing typing_extensions mkl mkl-include ninja && \
36
36
/opt/conda/bin/conda clean -ya
37
37
38
+ # ## change the pip source for installing packages
39
+ RUN if [ ${USE_SRC_INSIDE} == true ] ; \
40
+ then \
41
+ /opt/conda/bin/pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple; \
42
+ echo "pip using tsinghua source" ; \
43
+ else \
44
+ echo "Keep pip the download source unchanged" ; \
45
+ fi
46
+
38
47
# ## install pytorch openmim
39
48
RUN /opt/conda/bin/conda install pytorch==${TORCH_VERSION} torchvision==${TORCHVISION_VERSION} cudatoolkit=${CUDA} -c pytorch -c conda-forge -y \
40
49
&& /opt/conda/bin/pip install --no-cache-dir openmim
41
50
42
-
43
51
# ## pytorch mmcv onnxruntime
44
52
RUN /opt/conda/bin/mim install --no-cache-dir "mmcv" ${MMCV_VERSION} onnxruntime-gpu==${ONNXRUNTIME_VERSION} mmengine${MMENGINE_VERSION}
45
53
You can’t perform that action at this time.
0 commit comments