Use --no-cache-dir more often to save Docker image space
Resolves #38815. PiperOrigin-RevId: 308159278 Change-Id: I1fe2eee9516db723ddd952c91897b482eadfc6c7
This commit is contained in:
parent
c27b63fc5e
commit
cf1bf299d3
@ -53,9 +53,9 @@ RUN python3 -m pip install --no-cache-dir ${TF_PACKAGE}${TF_PACKAGE_VERSION:+==$
|
||||
COPY bashrc /etc/bash.bashrc
|
||||
RUN chmod a+rwx /etc/bash.bashrc
|
||||
|
||||
RUN python3 -m pip install jupyter matplotlib
|
||||
RUN python3 -m pip install --no-cache-dir jupyter matplotlib
|
||||
# Pin ipykernel and nbformat; see https://github.com/ipython/ipykernel/issues/422
|
||||
RUN python3 -m pip install jupyter_http_over_ws ipykernel==5.1.1 nbformat==4.4.0
|
||||
RUN python3 -m pip install --no-cache-dir jupyter_http_over_ws ipykernel==5.1.1 nbformat==4.4.0
|
||||
RUN jupyter serverextension enable --py jupyter_http_over_ws
|
||||
|
||||
RUN mkdir -p /tf/tensorflow-tutorials && chmod -R a+rwx /tf/
|
||||
|
@ -104,9 +104,9 @@ RUN mkdir /bazel && \
|
||||
COPY bashrc /etc/bash.bashrc
|
||||
RUN chmod a+rwx /etc/bash.bashrc
|
||||
|
||||
RUN python3 -m pip install jupyter matplotlib
|
||||
RUN python3 -m pip install --no-cache-dir jupyter matplotlib
|
||||
# Pin ipykernel and nbformat; see https://github.com/ipython/ipykernel/issues/422
|
||||
RUN python3 -m pip install jupyter_http_over_ws ipykernel==5.1.1 nbformat==4.4.0
|
||||
RUN python3 -m pip install --no-cache-dir jupyter_http_over_ws ipykernel==5.1.1 nbformat==4.4.0
|
||||
RUN jupyter serverextension enable --py jupyter_http_over_ws
|
||||
|
||||
RUN mkdir -p /tf/tensorflow-tutorials && chmod -R a+rwx /tf/
|
||||
|
@ -146,9 +146,9 @@ RUN mkdir /bazel && \
|
||||
COPY bashrc /etc/bash.bashrc
|
||||
RUN chmod a+rwx /etc/bash.bashrc
|
||||
|
||||
RUN python3 -m pip install jupyter matplotlib
|
||||
RUN python3 -m pip install --no-cache-dir jupyter matplotlib
|
||||
# Pin ipykernel and nbformat; see https://github.com/ipython/ipykernel/issues/422
|
||||
RUN python3 -m pip install jupyter_http_over_ws ipykernel==5.1.1 nbformat==4.4.0
|
||||
RUN python3 -m pip install --no-cache-dir jupyter_http_over_ws ipykernel==5.1.1 nbformat==4.4.0
|
||||
RUN jupyter serverextension enable --py jupyter_http_over_ws
|
||||
|
||||
RUN mkdir -p /tf/tensorflow-tutorials && chmod -R a+rwx /tf/
|
||||
|
@ -102,9 +102,9 @@ RUN python3 -m pip install --no-cache-dir ${TF_PACKAGE}${TF_PACKAGE_VERSION:+==$
|
||||
COPY bashrc /etc/bash.bashrc
|
||||
RUN chmod a+rwx /etc/bash.bashrc
|
||||
|
||||
RUN python3 -m pip install jupyter matplotlib
|
||||
RUN python3 -m pip install --no-cache-dir jupyter matplotlib
|
||||
# Pin ipykernel and nbformat; see https://github.com/ipython/ipykernel/issues/422
|
||||
RUN python3 -m pip install jupyter_http_over_ws ipykernel==5.1.1 nbformat==4.4.0
|
||||
RUN python3 -m pip install --no-cache-dir jupyter_http_over_ws ipykernel==5.1.1 nbformat==4.4.0
|
||||
RUN jupyter serverextension enable --py jupyter_http_over_ws
|
||||
|
||||
RUN mkdir -p /tf/tensorflow-tutorials && chmod -R a+rwx /tf/
|
||||
|
@ -93,7 +93,7 @@ RUN python3 -m pip --no-cache-dir install \
|
||||
enum34
|
||||
|
||||
# Install bazel
|
||||
ARG BAZEL_VERSION=2.0.0
|
||||
ARG BAZEL_VERSION=3.0.0
|
||||
RUN mkdir /bazel && \
|
||||
wget -O /bazel/installer.sh "https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-installer-linux-x86_64.sh" && \
|
||||
wget -O /bazel/LICENSE.txt "https://raw.githubusercontent.com/bazelbuild/bazel/master/LICENSE" && \
|
||||
@ -156,9 +156,9 @@ RUN test "${CHECKOUT_HOROVOD_SRC}" -eq 1 && git clone --recursive https://github
|
||||
COPY bashrc /etc/bash.bashrc
|
||||
RUN chmod a+rwx /etc/bash.bashrc
|
||||
|
||||
RUN python3 -m pip install jupyter matplotlib
|
||||
RUN python3 -m pip install --no-cache-dir jupyter matplotlib
|
||||
# Pin ipykernel and nbformat; see https://github.com/ipython/ipykernel/issues/422
|
||||
RUN python3 -m pip install jupyter_http_over_ws ipykernel==5.1.1 nbformat==4.4.0
|
||||
RUN python3 -m pip install --no-cache-dir jupyter_http_over_ws ipykernel==5.1.1 nbformat==4.4.0
|
||||
RUN jupyter serverextension enable --py jupyter_http_over_ws
|
||||
|
||||
RUN mkdir -p /tf/tensorflow-tutorials && chmod -R a+rwx /tf/
|
||||
|
@ -93,7 +93,7 @@ RUN python3 -m pip --no-cache-dir install \
|
||||
enum34
|
||||
|
||||
# Install bazel
|
||||
ARG BAZEL_VERSION=2.0.0
|
||||
ARG BAZEL_VERSION=3.0.0
|
||||
RUN mkdir /bazel && \
|
||||
wget -O /bazel/installer.sh "https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-installer-linux-x86_64.sh" && \
|
||||
wget -O /bazel/LICENSE.txt "https://raw.githubusercontent.com/bazelbuild/bazel/master/LICENSE" && \
|
||||
|
@ -105,9 +105,9 @@ RUN python3 -m pip install --no-cache-dir horovod==${HOROVOD_VERSION}
|
||||
COPY bashrc /etc/bash.bashrc
|
||||
RUN chmod a+rwx /etc/bash.bashrc
|
||||
|
||||
RUN python3 -m pip install jupyter matplotlib
|
||||
RUN python3 -m pip install --no-cache-dir jupyter matplotlib
|
||||
# Pin ipykernel and nbformat; see https://github.com/ipython/ipykernel/issues/422
|
||||
RUN python3 -m pip install jupyter_http_over_ws ipykernel==5.1.1 nbformat==4.4.0
|
||||
RUN python3 -m pip install --no-cache-dir jupyter_http_over_ws ipykernel==5.1.1 nbformat==4.4.0
|
||||
RUN jupyter serverextension enable --py jupyter_http_over_ws
|
||||
|
||||
RUN mkdir -p /tf/tensorflow-tutorials && chmod -R a+rwx /tf/
|
||||
|
@ -46,7 +46,7 @@ RUN ln -s $(which python3) /usr/local/bin/python
|
||||
# tf-nightly-gpu
|
||||
ARG TF_PACKAGE=tensorflow
|
||||
RUN apt-get update && apt-get install -y curl libhdf5-dev wget
|
||||
RUN python3 -m pip install --global-option=build_ext \
|
||||
RUN python3 -m pip install --no-cache-dir --global-option=build_ext \
|
||||
--global-option=-I/usr/include/hdf5/serial/ \
|
||||
--global-option=-L/usr/lib/powerpc64le-linux-gnu/hdf5/serial \
|
||||
h5py
|
||||
@ -66,14 +66,14 @@ RUN if [ ${TF_PACKAGE} = tensorflow-gpu ]; then \
|
||||
MINOR=`python3 -c 'import sys; print(sys.version_info[1])'`; \
|
||||
PACKAGE=$(wget -qO- ${BASE}"api/xml?xpath=//fileName&wrapper=artifacts" | grep -o "[^<>]*cp${MAJOR}${MINOR}[^<>]*.whl"); \
|
||||
wget ${BASE}"artifact/tensorflow_pkg/"${PACKAGE}; \
|
||||
python3 -m pip install ${PACKAGE}
|
||||
python3 -m pip install --no-cache-dir ${PACKAGE}
|
||||
|
||||
COPY bashrc /etc/bash.bashrc
|
||||
RUN chmod a+rwx /etc/bash.bashrc
|
||||
|
||||
RUN python3 -m pip install jupyter matplotlib
|
||||
RUN python3 -m pip install --no-cache-dir jupyter matplotlib
|
||||
# Pin ipykernel and nbformat; see https://github.com/ipython/ipykernel/issues/422
|
||||
RUN python3 -m pip install jupyter_http_over_ws ipykernel==5.1.1 nbformat==4.4.0
|
||||
RUN python3 -m pip install --no-cache-dir jupyter_http_over_ws ipykernel==5.1.1 nbformat==4.4.0
|
||||
RUN jupyter serverextension enable --py jupyter_http_over_ws
|
||||
|
||||
RUN mkdir -p /tf/tensorflow-tutorials && chmod -R a+rwx /tf/
|
||||
|
@ -46,7 +46,7 @@ RUN ln -s $(which python3) /usr/local/bin/python
|
||||
# tf-nightly-gpu
|
||||
ARG TF_PACKAGE=tensorflow
|
||||
RUN apt-get update && apt-get install -y curl libhdf5-dev wget
|
||||
RUN python3 -m pip install --global-option=build_ext \
|
||||
RUN python3 -m pip install --no-cache-dir --global-option=build_ext \
|
||||
--global-option=-I/usr/include/hdf5/serial/ \
|
||||
--global-option=-L/usr/lib/powerpc64le-linux-gnu/hdf5/serial \
|
||||
h5py
|
||||
@ -66,7 +66,7 @@ RUN if [ ${TF_PACKAGE} = tensorflow-gpu ]; then \
|
||||
MINOR=`python3 -c 'import sys; print(sys.version_info[1])'`; \
|
||||
PACKAGE=$(wget -qO- ${BASE}"api/xml?xpath=//fileName&wrapper=artifacts" | grep -o "[^<>]*cp${MAJOR}${MINOR}[^<>]*.whl"); \
|
||||
wget ${BASE}"artifact/tensorflow_pkg/"${PACKAGE}; \
|
||||
python3 -m pip install ${PACKAGE}
|
||||
python3 -m pip install --no-cache-dir ${PACKAGE}
|
||||
|
||||
COPY bashrc /etc/bash.bashrc
|
||||
RUN chmod a+rwx /etc/bash.bashrc
|
||||
|
@ -91,7 +91,7 @@ RUN python3 -m pip --no-cache-dir install \
|
||||
enum34
|
||||
|
||||
# Build and install bazel
|
||||
ENV BAZEL_VERSION 0.15.0
|
||||
ENV BAZEL_VERSION 3.0.0
|
||||
WORKDIR /
|
||||
RUN mkdir /bazel && \
|
||||
cd /bazel && \
|
||||
@ -105,9 +105,9 @@ RUN mkdir /bazel && \
|
||||
COPY bashrc /etc/bash.bashrc
|
||||
RUN chmod a+rwx /etc/bash.bashrc
|
||||
|
||||
RUN python3 -m pip install jupyter matplotlib
|
||||
RUN python3 -m pip install --no-cache-dir jupyter matplotlib
|
||||
# Pin ipykernel and nbformat; see https://github.com/ipython/ipykernel/issues/422
|
||||
RUN python3 -m pip install jupyter_http_over_ws ipykernel==5.1.1 nbformat==4.4.0
|
||||
RUN python3 -m pip install --no-cache-dir jupyter_http_over_ws ipykernel==5.1.1 nbformat==4.4.0
|
||||
RUN jupyter serverextension enable --py jupyter_http_over_ws
|
||||
|
||||
RUN mkdir -p /tf/tensorflow-tutorials && chmod -R a+rwx /tf/
|
||||
|
@ -91,7 +91,7 @@ RUN python3 -m pip --no-cache-dir install \
|
||||
enum34
|
||||
|
||||
# Build and install bazel
|
||||
ENV BAZEL_VERSION 0.15.0
|
||||
ENV BAZEL_VERSION 3.0.0
|
||||
WORKDIR /
|
||||
RUN mkdir /bazel && \
|
||||
cd /bazel && \
|
||||
|
@ -133,7 +133,7 @@ RUN python3 -m pip --no-cache-dir install \
|
||||
enum34
|
||||
|
||||
# Build and install bazel
|
||||
ENV BAZEL_VERSION 0.15.0
|
||||
ENV BAZEL_VERSION 3.0.0
|
||||
WORKDIR /
|
||||
RUN mkdir /bazel && \
|
||||
cd /bazel && \
|
||||
@ -147,9 +147,9 @@ RUN mkdir /bazel && \
|
||||
COPY bashrc /etc/bash.bashrc
|
||||
RUN chmod a+rwx /etc/bash.bashrc
|
||||
|
||||
RUN python3 -m pip install jupyter matplotlib
|
||||
RUN python3 -m pip install --no-cache-dir jupyter matplotlib
|
||||
# Pin ipykernel and nbformat; see https://github.com/ipython/ipykernel/issues/422
|
||||
RUN python3 -m pip install jupyter_http_over_ws ipykernel==5.1.1 nbformat==4.4.0
|
||||
RUN python3 -m pip install --no-cache-dir jupyter_http_over_ws ipykernel==5.1.1 nbformat==4.4.0
|
||||
RUN jupyter serverextension enable --py jupyter_http_over_ws
|
||||
|
||||
RUN mkdir -p /tf/tensorflow-tutorials && chmod -R a+rwx /tf/
|
||||
|
@ -133,7 +133,7 @@ RUN python3 -m pip --no-cache-dir install \
|
||||
enum34
|
||||
|
||||
# Build and install bazel
|
||||
ENV BAZEL_VERSION 0.15.0
|
||||
ENV BAZEL_VERSION 3.0.0
|
||||
WORKDIR /
|
||||
RUN mkdir /bazel && \
|
||||
cd /bazel && \
|
||||
|
@ -95,7 +95,7 @@ RUN ln -s $(which python3) /usr/local/bin/python
|
||||
# tf-nightly-gpu
|
||||
ARG TF_PACKAGE=tensorflow
|
||||
RUN apt-get update && apt-get install -y curl libhdf5-dev wget
|
||||
RUN python3 -m pip install --global-option=build_ext \
|
||||
RUN python3 -m pip install --no-cache-dir --global-option=build_ext \
|
||||
--global-option=-I/usr/include/hdf5/serial/ \
|
||||
--global-option=-L/usr/lib/powerpc64le-linux-gnu/hdf5/serial \
|
||||
h5py
|
||||
@ -115,14 +115,14 @@ RUN if [ ${TF_PACKAGE} = tensorflow-gpu ]; then \
|
||||
MINOR=`python3 -c 'import sys; print(sys.version_info[1])'`; \
|
||||
PACKAGE=$(wget -qO- ${BASE}"api/xml?xpath=//fileName&wrapper=artifacts" | grep -o "[^<>]*cp${MAJOR}${MINOR}[^<>]*.whl"); \
|
||||
wget ${BASE}"artifact/tensorflow_pkg/"${PACKAGE}; \
|
||||
python3 -m pip install ${PACKAGE}
|
||||
python3 -m pip install --no-cache-dir ${PACKAGE}
|
||||
|
||||
COPY bashrc /etc/bash.bashrc
|
||||
RUN chmod a+rwx /etc/bash.bashrc
|
||||
|
||||
RUN python3 -m pip install jupyter matplotlib
|
||||
RUN python3 -m pip install --no-cache-dir jupyter matplotlib
|
||||
# Pin ipykernel and nbformat; see https://github.com/ipython/ipykernel/issues/422
|
||||
RUN python3 -m pip install jupyter_http_over_ws ipykernel==5.1.1 nbformat==4.4.0
|
||||
RUN python3 -m pip install --no-cache-dir jupyter_http_over_ws ipykernel==5.1.1 nbformat==4.4.0
|
||||
RUN jupyter serverextension enable --py jupyter_http_over_ws
|
||||
|
||||
RUN mkdir -p /tf/tensorflow-tutorials && chmod -R a+rwx /tf/
|
||||
|
@ -95,7 +95,7 @@ RUN ln -s $(which python3) /usr/local/bin/python
|
||||
# tf-nightly-gpu
|
||||
ARG TF_PACKAGE=tensorflow
|
||||
RUN apt-get update && apt-get install -y curl libhdf5-dev wget
|
||||
RUN python3 -m pip install --global-option=build_ext \
|
||||
RUN python3 -m pip install --no-cache-dir --global-option=build_ext \
|
||||
--global-option=-I/usr/include/hdf5/serial/ \
|
||||
--global-option=-L/usr/lib/powerpc64le-linux-gnu/hdf5/serial \
|
||||
h5py
|
||||
@ -115,7 +115,7 @@ RUN if [ ${TF_PACKAGE} = tensorflow-gpu ]; then \
|
||||
MINOR=`python3 -c 'import sys; print(sys.version_info[1])'`; \
|
||||
PACKAGE=$(wget -qO- ${BASE}"api/xml?xpath=//fileName&wrapper=artifacts" | grep -o "[^<>]*cp${MAJOR}${MINOR}[^<>]*.whl"); \
|
||||
wget ${BASE}"artifact/tensorflow_pkg/"${PACKAGE}; \
|
||||
python3 -m pip install ${PACKAGE}
|
||||
python3 -m pip install --no-cache-dir ${PACKAGE}
|
||||
|
||||
COPY bashrc /etc/bash.bashrc
|
||||
RUN chmod a+rwx /etc/bash.bashrc
|
||||
|
@ -1,6 +1,6 @@
|
||||
RUN python3 -m pip install jupyter matplotlib
|
||||
RUN python3 -m pip install --no-cache-dir jupyter matplotlib
|
||||
# Pin ipykernel and nbformat; see https://github.com/ipython/ipykernel/issues/422
|
||||
RUN python3 -m pip install jupyter_http_over_ws ipykernel==5.1.1 nbformat==4.4.0
|
||||
RUN python3 -m pip install --no-cache-dir jupyter_http_over_ws ipykernel==5.1.1 nbformat==4.4.0
|
||||
RUN jupyter serverextension enable --py jupyter_http_over_ws
|
||||
|
||||
RUN mkdir -p /tf/tensorflow-tutorials && chmod -R a+rwx /tf/
|
||||
|
@ -5,7 +5,7 @@
|
||||
# tf-nightly-gpu
|
||||
ARG TF_PACKAGE=tensorflow
|
||||
RUN apt-get update && apt-get install -y curl libhdf5-dev wget
|
||||
RUN python3 -m pip install --global-option=build_ext \
|
||||
RUN python3 -m pip install --no-cache-dir --global-option=build_ext \
|
||||
--global-option=-I/usr/include/hdf5/serial/ \
|
||||
--global-option=-L/usr/lib/powerpc64le-linux-gnu/hdf5/serial \
|
||||
h5py
|
||||
@ -25,4 +25,4 @@ RUN if [ ${TF_PACKAGE} = tensorflow-gpu ]; then \
|
||||
MINOR=`python3 -c 'import sys; print(sys.version_info[1])'`; \
|
||||
PACKAGE=$(wget -qO- ${BASE}"api/xml?xpath=//fileName&wrapper=artifacts" | grep -o "[^<>]*cp${MAJOR}${MINOR}[^<>]*.whl"); \
|
||||
wget ${BASE}"artifact/tensorflow_pkg/"${PACKAGE}; \
|
||||
python3 -m pip install ${PACKAGE}
|
||||
python3 -m pip install --no-cache-dir ${PACKAGE}
|
||||
|
Loading…
Reference in New Issue
Block a user