Skip to content

Commit 9a32200

Browse files
committed
Reduce docker image size
1 parent c811c5f commit 9a32200

File tree

2 files changed

+6
-18
lines changed

2 files changed

+6
-18
lines changed

Dockerfile

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,16 @@
11
FROM nvidia/cuda:9.0-cudnn7-devel-ubuntu16.04
2-
# Set anaconda path
3-
ENV ANACONDA /opt/anaconda
2+
ENV ANACONDA /opt/anaconda2
43
ENV CUDA_PATH /usr/local/cuda
54
ENV PATH ${ANACONDA}/bin:${CUDA_PATH}/bin:$PATH
65
ENV LD_LIBRARY_PATH ${ANACONDA}/lib:${CUDA_PATH}/bin64:$LD_LIBRARY_PATH
7-
# Download anaconda and install it
8-
RUN apt-get update && apt-get install -y wget build-essential
9-
RUN apt-get update && apt-get install -y libopencv-dev python-opencv
10-
RUN apt-get update && apt-get install -y --no-install-recommends \
11-
build-essential \
12-
cmake \
13-
git \
14-
curl \
15-
ca-certificates \
16-
libjpeg-dev \
17-
libpng-dev
6+
ENV C_INCLUDE_PATH ${CUDA_PATH}/include
7+
RUN apt-get update && apt-get install -y wget build-essential axel imagemagick python-opencv
188
RUN wget https://repo.continuum.io/archive/Anaconda2-5.0.1-Linux-x86_64.sh -P /tmp
199
RUN bash /tmp/Anaconda2-5.0.1-Linux-x86_64.sh -b -p $ANACONDA
2010
RUN rm /tmp/Anaconda2-5.0.1-Linux-x86_64.sh -rf
2111
RUN conda install -y pytorch torchvision cuda90 -c pytorch
2212
RUN conda install -y -c menpo opencv3
23-
#RUN conda install -y -c anaconda pip
2413
RUN pip install scikit-umfpack
25-
RUN pip install -U setuptools
2614
RUN pip install cupy
2715
RUN pip install pynvrtc
28-
RUN apt-get install -y axel
29-
RUN apt-get install -y imagemagick
30-
ENV C_INCLUDE_PATH ${CUDA_PATH}/include
16+

demo.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
rm images -rf;
2+
rm results -rf;
13
mkdir images && mkdir results;
24
cd images;
35
axel -n 1 http://freebigpictures.com/wp-content/uploads/shady-forest.jpg --output=content1.png;

0 commit comments

Comments
 (0)