docker lose weight

This commit is contained in:
yanghaoran 2022-04-24 16:40:59 +08:00
parent bf9f848a09
commit 0f1279cb45
7 changed files with 21 additions and 10 deletions

View File

@ -47,6 +47,7 @@ RUN DEBIAN_FRONTEND=noninteractive dpkg-reconfigure dash
# Install python (v3.7.5)
RUN apt install -y libffi-dev libssl-dev zlib1g-dev libbz2-dev libncurses5-dev \
libgdbm-dev libgdbm-compat-dev liblzma-dev libreadline-dev libsqlite3-dev \
&& rm -rf /var/lib/apt/lists/* \
&& cd /tmp \
&& wget https://github.com/python/cpython/archive/v3.7.5.tar.gz \
&& tar -xvf v3.7.5.tar.gz \
@ -71,8 +72,7 @@ RUN mkdir -pv /root/.pip \
&& echo "trusted-host=mirrors.aliyun.com" >> /root/.pip/pip.conf \
&& echo "index-url=http://mirrors.aliyun.com/pypi/simple/" >> /root/.pip/pip.conf
# Install MindSpore cpu whl package
RUN pip install --no-cache-dir https://ms-release.obs.cn-north-4.myhuaweicloud.com/1.7.0/MindSpore/cpu/x86_64/mindspore-1.7.0-cp37-cp37m-linux_x86_64.whl
# Install MindInsight cpu whl package
RUN pip install --no-cache-dir https://ms-release.obs.cn-north-4.myhuaweicloud.com/1.7.0/MindInsight/any/mindinsight-1.7.0-py3-none-any.whl
# Install MindSpore cpu and MindInsight packages
RUN pip install --no-cache-dir https://ms-release.obs.cn-north-4.myhuaweicloud.com/1.7.0/MindSpore/cpu/x86_64/mindspore-1.7.0-cp37-cp37m-linux_x86_64.whl \
&& pip install --no-cache-dir https://ms-release.obs.cn-north-4.myhuaweicloud.com/1.7.0/MindInsight/any/mindinsight-1.7.0-py3-none-any.whl \
&& pip cache purge

View File

@ -49,6 +49,7 @@ RUN DEBIAN_FRONTEND=noninteractive dpkg-reconfigure dash
# Install python (v3.7.5)
RUN apt install -y libffi-dev libssl-dev zlib1g-dev libbz2-dev libncurses5-dev \
libgdbm-dev libgdbm-compat-dev liblzma-dev libreadline-dev libsqlite3-dev \
&& rm -rf /var/lib/apt/lists/* \
&& cd /tmp \
&& wget https://github.com/python/cpython/archive/v3.7.5.tar.gz \
&& tar -xvf v3.7.5.tar.gz \
@ -72,7 +73,8 @@ RUN mkdir -pv /root/.pip \
&& echo "[global]" > /root/.pip/pip.conf \
&& echo "trusted-host=mirrors.aliyun.com" >> /root/.pip/pip.conf \
&& echo "index-url=http://mirrors.aliyun.com/pypi/simple/" >> /root/.pip/pip.conf \
&& pip install --no-cache-dir wheel
&& pip install --no-cache-dir wheel \
&& pip cache purge
# Install cmake (v3.14.1)
RUN cd /tmp \

View File

@ -47,6 +47,7 @@ RUN DEBIAN_FRONTEND=noninteractive dpkg-reconfigure dash
# Install python (v3.7.5)
RUN apt install -y libffi-dev libssl-dev zlib1g-dev libbz2-dev libncurses5-dev \
libgdbm-dev libgdbm-compat-dev liblzma-dev libreadline-dev libsqlite3-dev \
&& rm -rf /var/lib/apt/lists/* \
&& cd /tmp \
&& wget https://github.com/python/cpython/archive/v3.7.5.tar.gz \
&& tar -xvf v3.7.5.tar.gz \

View File

@ -49,6 +49,7 @@ RUN DEBIAN_FRONTEND=noninteractive dpkg-reconfigure dash
# Install python (v3.7.5)
RUN apt install -y libffi-dev libssl-dev zlib1g-dev libbz2-dev libncurses5-dev \
libgdbm-dev libgdbm-compat-dev liblzma-dev libreadline-dev libsqlite3-dev \
&& rm -rf /var/lib/apt/lists/* \
&& cd /tmp \
&& wget https://github.com/python/cpython/archive/v3.7.5.tar.gz \
&& tar -xvf v3.7.5.tar.gz \
@ -88,4 +89,5 @@ RUN cd /tmp \
# Install MindSpore cuda-10.1, MindInsight, Serving whl package
RUN pip install --no-cache-dir https://ms-release.obs.cn-north-4.myhuaweicloud.com/1.7.0/MindSpore/gpu/x86_64/cuda-10.1/mindspore_gpu-1.7.0-cp37-cp37m-linux_x86_64.whl \
&& pip install --no-cache-dir https://ms-release.obs.cn-north-4.myhuaweicloud.com/1.7.0/MindInsight/any/mindinsight-1.7.0-py3-none-any.whl \
&& pip install --no-cache-dir https://ms-release.obs.cn-north-4.myhuaweicloud.com/1.7.0/Serving/x86_64/mindspore_serving-1.7.0-cp37-cp37m-linux_x86_64.whl
&& pip install --no-cache-dir https://ms-release.obs.cn-north-4.myhuaweicloud.com/1.7.0/Serving/x86_64/mindspore_serving-1.7.0-cp37-cp37m-linux_x86_64.whl \
&& pip cache purge

View File

@ -49,6 +49,7 @@ RUN DEBIAN_FRONTEND=noninteractive dpkg-reconfigure dash
# Install python (v3.7.5)
RUN apt install -y libffi-dev libssl-dev zlib1g-dev libbz2-dev libncurses5-dev \
libgdbm-dev libgdbm-compat-dev liblzma-dev libreadline-dev libsqlite3-dev \
&& rm -rf /var/lib/apt/lists/* \
&& cd /tmp \
&& wget https://github.com/python/cpython/archive/v3.7.5.tar.gz \
&& tar -xvf v3.7.5.tar.gz \
@ -88,4 +89,5 @@ RUN cd /tmp \
# Install MindSpore cuda-11.1, MindInsight, Serving whl package
RUN pip install --no-cache-dir https://ms-release.obs.cn-north-4.myhuaweicloud.com/1.7.0/MindSpore/gpu/x86_64/cuda-11.1/mindspore_gpu-1.7.0-cp37-cp37m-linux_x86_64.whl \
&& pip install --no-cache-dir https://ms-release.obs.cn-north-4.myhuaweicloud.com/1.7.0/MindInsight/any/mindinsight-1.7.0-py3-none-any.whl \
&& pip install --no-cache-dir https://ms-release.obs.cn-north-4.myhuaweicloud.com/1.7.0/Serving/x86_64/mindspore_serving-1.7.0-cp37-cp37m-linux_x86_64.whl
&& pip install --no-cache-dir https://ms-release.obs.cn-north-4.myhuaweicloud.com/1.7.0/Serving/x86_64/mindspore_serving-1.7.0-cp37-cp37m-linux_x86_64.whl \
&& pip cache purge

View File

@ -53,6 +53,7 @@ RUN DEBIAN_FRONTEND=noninteractive dpkg-reconfigure dash
# Install python (v3.7.5)
RUN apt install -y libffi-dev libssl-dev zlib1g-dev libbz2-dev libncurses5-dev \
libgdbm-dev libgdbm-compat-dev liblzma-dev libreadline-dev libsqlite3-dev \
&& rm -rf /var/lib/apt/lists/* \
&& cd /tmp \
&& wget https://github.com/python/cpython/archive/v3.7.5.tar.gz \
&& tar -xvf v3.7.5.tar.gz \
@ -76,7 +77,8 @@ RUN mkdir -pv /root/.pip \
&& echo "[global]" > /root/.pip/pip.conf \
&& echo "trusted-host=mirrors.aliyun.com" >> /root/.pip/pip.conf \
&& echo "index-url=http://mirrors.aliyun.com/pypi/simple/" >> /root/.pip/pip.conf \
&& pip install --no-cache-dir wheel
&& pip install --no-cache-dir wheel \
&& pip cache purge
# Install cmake (v3.14.1)
RUN cd /tmp \

View File

@ -49,6 +49,7 @@ RUN DEBIAN_FRONTEND=noninteractive dpkg-reconfigure dash
# Install python (v3.7.5)
RUN apt install -y libffi-dev libssl-dev zlib1g-dev libbz2-dev libncurses5-dev \
libgdbm-dev libgdbm-compat-dev liblzma-dev libreadline-dev libsqlite3-dev \
&& rm -rf /var/lib/apt/lists/* \
&& cd /tmp \
&& wget https://github.com/python/cpython/archive/v3.7.5.tar.gz \
&& tar -xvf v3.7.5.tar.gz \
@ -86,4 +87,5 @@ RUN cd /tmp \
&& rm -f /tmp/openmpi-4.0.3.tar.gz
# Install frequently used python packages
RUN pip install --no-cache-dir decorator pandas sklearn pyyaml
RUN pip install --no-cache-dir decorator pandas sklearn pyyaml \
&& pip cache purge