Skip to content

Commit

Permalink
Reduce docker image size
Browse files Browse the repository at this point in the history
  • Loading branch information
mingyuliutw committed Feb 24, 2018
1 parent c811c5f commit 9a32200
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 18 deletions.
22 changes: 4 additions & 18 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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

2 changes: 2 additions & 0 deletions demo.sh
Original file line number Diff line number Diff line change
@@ -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;
Expand Down

0 comments on commit 9a32200

Please sign in to comment.