Skip to content

Commit

Permalink
Removing X11 as an indirect dependency from the docker files. Matplot…
Browse files Browse the repository at this point in the history
…lib now biggest candidate for reduction with scikit-image.
  • Loading branch information
alexjc committed May 3, 2016
1 parent 195e393 commit 59446a8
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 18 deletions.
6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,9 @@ This is how you can do it in your terminal console on OSX or Linux:

..code bash::
# Setup the alias. Put this in your .bash_rc or .zshrc file so it's available at startup.
alias doodle="docker run -it alexjc/neural-doodle
-v samples:/nd/samples -w /nd/samples
-v frames:/nd/frames -w /nd/frames"
alias doodle="docker run -v samples:/nd/samples -w /nd/samples \
-v frames:/nd/frames -w /nd/frames \
-it alexjc/neural-doodle"
# Now run any of the examples above using this alias, without the `.py` extension.
doodle --help
Expand Down
17 changes: 7 additions & 10 deletions docker-cpu.df
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM ubuntu:14.04

# Install dependencies
RUN apt-get update -qq && \
apt-get install -qq --assume-yes \
RUN apt-get -qq update && \
apt-get -qq install --assume-yes \
"build-essential" \
"cmake" \
"git" \
Expand All @@ -16,31 +16,28 @@ RUN apt-get update -qq && \
"libfreetype6-dev" \
"liblcms2-dev" \
"libwebp-dev" \
"tcl8.6-dev" \
"tk8.6-dev" \
"gfortran" \
"pkg-config" \
"python3" \
"python3-dev" \
"python3-pip" \
"python3-numpy" \
"python3-scipy" \
"python3-matplotlib" \
"python3-six" \
"python3-networkx" \
"python3-tk" && \
"python3-networkx" && \
rm -rf /var/lib/apt/lists/* && \
python3 -m pip -q install "cython"
python3 -m pip install "cython"

# Install requirements before copying project files
WORKDIR /nd
COPY requirements.txt .
RUN python3 -m pip -q install -r "requirements.txt"
RUN python3 -m pip install -r "requirements.txt"

# Copy only required project files
COPY doodle.py .

# Get a pre-trained neural network (VGG19)
RUN wget "https://github.com/alexjc/neural-doodle/releases/download/v0.0/vgg19_conv.pkl.bz2"
RUN wget -q "https://github.com/alexjc/neural-doodle/releases/download/v0.0/vgg19_conv.pkl.bz2"

# Set an entrypoint to the main doodle.py script
ENTRYPOINT ["python3", "doodle.py", "--device=cpu"]
9 changes: 4 additions & 5 deletions docker-gpu.df
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM nvidia/cuda:7.5-cudnn4-devel

# Install dependencies
RUN apt-get update -qq && \
apt-get install --assume-yes -qq \
RUN apt-get -qq update && \
apt-get -qq install --assume-yes \
"module-init-tools" \
"build-essential" \
"cmake" \
Expand All @@ -17,9 +17,8 @@ RUN apt-get update -qq && \
"libfreetype6-dev" \
"liblcms2-dev" \
"libwebp-dev" \
"tcl8.6-dev" \
"tk8.6-dev" \
"gfortran" \
"pkg-config" \
"python3" \
"python3-dev" \
"python3-pip" \
Expand All @@ -41,7 +40,7 @@ RUN python3 -m pip -q install -r "requirements.txt"
COPY doodle.py .

# Get a pre-trained neural network (VGG19)
RUN wget "https://github.com/alexjc/neural-doodle/releases/download/v0.0/vgg19_conv.pkl.bz2"
RUN wget -q "https://github.com/alexjc/neural-doodle/releases/download/v0.0/vgg19_conv.pkl.bz2"

# Set an entrypoint to the main doodle.py script
ENTRYPOINT ["python3", "doodle.py", "--device=gpu"]

0 comments on commit 59446a8

Please sign in to comment.