Skip to content

Commit

Permalink
Docker: simplifying folder structure for easier documentation, output…
Browse files Browse the repository at this point in the history
… less verbose.
  • Loading branch information
alexjc committed May 3, 2016
1 parent 5de736c commit c8b0c1a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 18 deletions.
13 changes: 6 additions & 7 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 && \
apt-get install --assume-yes \
RUN apt-get update -qq && \
apt-get install -qq --assume-yes \
"build-essential" \
"cmake" \
"git" \
Expand All @@ -27,21 +27,20 @@ RUN apt-get update && \
"python3-matplotlib" \
"python3-six" \
"python3-networkx" \
"python3-tk" && \
rm -rf /var/lib/apt/lists/* && \
"python3-tk" && \
rm -rf /var/lib/apt/lists/* && \
python3 -m pip install "cython"

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

# Copy only required project files
COPY samples samples
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"

# Set an entrypoint to the main doodle.py script
ENTRYPOINT ["python3", "doodle.py"]
ENTRYPOINT ["python3", "doodle.py", "--device=cpu"]
11 changes: 5 additions & 6 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 && \
apt-get install --assume-yes \
RUN apt-get update -qq && \
apt-get install --assume-yes -qq \
"module-init-tools" \
"build-essential" \
"cmake" \
Expand All @@ -28,17 +28,16 @@ RUN apt-get update && \
"python3-matplotlib" \
"python3-six" \
"python3-networkx" \
"python3-tk" && \
rm -rf /var/lib/apt/lists/* && \
"python3-tk" && \
rm -rf /var/lib/apt/lists/* && \
python3 -m pip install "cython"

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

# Copy only required project files
COPY samples samples
COPY doodle.py .

# Get a pre-trained neural network (VGG19)
Expand Down
2 changes: 0 additions & 2 deletions docker/install-cuda-drivers-ubuntu-14.04.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/usr/bin/env bash

# Install dependencies

apt-get update
apt-get install --assume-yes \
"linux-source" \
Expand All @@ -11,7 +10,6 @@ apt-get install --assume-yes \
"wget"

# Install NVIDIA CUDA with NVIDIA GPU drivers

CUDA_REPOSITORY="cuda-repo-ubuntu1404_7.5-18_amd64.deb"
CUDA_REPOSITORY_URL="http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64"

Expand Down
3 changes: 0 additions & 3 deletions docker/install-nvidia-docker-ubuntu-14.04.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
#!/usr/bin/env bash

# Install dependencies

apt-get update
apt-get install --assume-yes "wget"

# Install Docker Engine

wget --quiet --output-document="-" "https://get.docker.com" | sh
usermod --append --groups="docker" "$SUDO_USER"

# Install an NVIDIA Docker wrapper

NVIDIA_DOCKER="nvidia-docker_1.0.0.beta.2-1_amd64.deb"
NVIDIA_DOCKER_URL="https://github.com/NVIDIA/nvidia-docker/releases/download/v1.0.0-beta.2"

Expand Down

0 comments on commit c8b0c1a

Please sign in to comment.