Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pip3 --no-cache-dir and apt clean to reduce image size #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 8 additions & 11 deletions Dockerfile.tensorflow
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ RUN printenv
#
RUN apt-get update && \
apt-get install -y --no-install-recommends \
python3-pip \
python3-pip \
python3-dev \
gfortran \
build-essential \
Expand All @@ -49,13 +49,13 @@ RUN apt-get update && \
zlib1g-dev \
zip \
libjpeg8-dev \
&& rm -rf /var/lib/apt/lists/*
&& rm -rf /var/lib/apt/lists/* \
&& apt-get clean


RUN pip3 install setuptools Cython wheel
RUN pip3 install numpy --verbose
RUN pip3 install h5py==2.10.0 --verbose
RUN pip3 install future==0.17.1 mock==3.0.5 keras_preprocessing==1.0.5 keras_applications==1.0.8 gast==0.2.2 futures protobuf pybind11 --verbose
RUN pip3 install --no-cache-dir --verbose \
setuptools Cython wheel numpy h5py==2.10.0 future==0.17.1 mock==3.0.5 keras_preprocessing==1.0.5 \
keras_applications==1.0.8 gast==0.2.2 futures protobuf pybind11


#
Expand All @@ -67,7 +67,7 @@ ARG TENSORFLOW_URL=https://nvidia.box.com/shared/static/rummpy6q1km1wivomalpkwt2
ARG TENSORFLOW_WHL=tensorflow-1.15.2+nv-cp36-cp36m-linux_aarch64.whl

RUN wget --quiet --show-progress --progress=bar:force:noscroll --no-check-certificate ${TENSORFLOW_URL} -O ${TENSORFLOW_WHL} && \
pip3 install ${TENSORFLOW_WHL} --verbose && \
pip3 install --no-cache-dir --verbose ${TENSORFLOW_WHL} && \
rm ${TENSORFLOW_WHL}


Expand All @@ -78,7 +78,4 @@ ENV PATH="/usr/local/cuda/bin:${PATH}"
ENV LD_LIBRARY_PATH="/usr/local/cuda/lib64:${LD_LIBRARY_PATH}"
RUN echo "$PATH" && echo "$LD_LIBRARY_PATH"

RUN pip3 install pycuda --verbose



RUN pip3 install --no-cache-dir --verbose pycuda