From 9a322008c95e276cd18a431752840807012bd6b3 Mon Sep 17 00:00:00 2001 From: Ming-Yu Liu Date: Fri, 23 Feb 2018 20:27:36 -0800 Subject: [PATCH] Reduce docker image size --- Dockerfile | 22 ++++------------------ demo.sh | 2 ++ 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/Dockerfile b/Dockerfile index 74625f3..744ceb6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,30 +1,16 @@ FROM nvidia/cuda:9.0-cudnn7-devel-ubuntu16.04 -# Set anaconda path -ENV ANACONDA /opt/anaconda +ENV ANACONDA /opt/anaconda2 ENV CUDA_PATH /usr/local/cuda ENV PATH ${ANACONDA}/bin:${CUDA_PATH}/bin:$PATH ENV LD_LIBRARY_PATH ${ANACONDA}/lib:${CUDA_PATH}/bin64:$LD_LIBRARY_PATH -# Download anaconda and install it -RUN apt-get update && apt-get install -y wget build-essential -RUN apt-get update && apt-get install -y libopencv-dev python-opencv -RUN apt-get update && apt-get install -y --no-install-recommends \ - build-essential \ - cmake \ - git \ - curl \ - ca-certificates \ - libjpeg-dev \ - libpng-dev +ENV C_INCLUDE_PATH ${CUDA_PATH}/include +RUN apt-get update && apt-get install -y wget build-essential axel imagemagick python-opencv RUN wget https://repo.continuum.io/archive/Anaconda2-5.0.1-Linux-x86_64.sh -P /tmp RUN bash /tmp/Anaconda2-5.0.1-Linux-x86_64.sh -b -p $ANACONDA RUN rm /tmp/Anaconda2-5.0.1-Linux-x86_64.sh -rf RUN conda install -y pytorch torchvision cuda90 -c pytorch RUN conda install -y -c menpo opencv3 -#RUN conda install -y -c anaconda pip RUN pip install scikit-umfpack -RUN pip install -U setuptools RUN pip install cupy RUN pip install pynvrtc -RUN apt-get install -y axel -RUN apt-get install -y imagemagick -ENV C_INCLUDE_PATH ${CUDA_PATH}/include + diff --git a/demo.sh b/demo.sh index f04f9b5..929e0c3 100755 --- a/demo.sh +++ b/demo.sh @@ -1,3 +1,5 @@ +rm images -rf; +rm results -rf; mkdir images && mkdir results; cd images; axel -n 1 http://freebigpictures.com/wp-content/uploads/shady-forest.jpg --output=content1.png;