Skip to content

Commit

Permalink
Adding documentation for docker in the README.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexjc committed May 3, 2016
1 parent c8b0c1a commit 195e393
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 6 deletions.
30 changes: 28 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,36 @@ You can configure the algorithm using the following parameters. Type ``python3 d
2. Installation & Setup
=======================

2.a) Using Docker Image (recommended)
-------------------------------

The easiest way to get up-and-running is to `install Docker <https://www.docker.com/>`_. Then, you should be able to downloand and run the pre-built image using the `docker` command line tool. Find out more about the `alexjc/neural-doodle` image on its `Docker Hub https://hub.docker.com/r/alexjc/neural-doodle/`_ page.

The easiest way to run the script from the docker image is to setup an easy access command called `doodle`. This will automatically:

* Mount the `frames` folder from the current directory into the instance for visualization.
* Expose the `samples` folder from the current directory so the script can access files!

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"
# Now run any of the examples above using this alias, without the `.py` extension.
doodle --help

*NOTE*: If you want to run on your NVIDIA GPU, you can instead use the image `alexjc/neural-doodle:gpu` which comes with CUDA and CUDNN pre-installed in the image. See the scripts in `docker/*.sh` for how to setup your host machine. (advanced)


2.b) Manual Installation (optional)
-----------------------------------

This project requires Python 3.4+ and you'll also need ``numpy`` and ``scipy`` (numerical computing libraries) as well as ``python3-dev`` installed system-wide. If you want more detailed instructions, follow these:

0. Use Prepared `Docker Container <https://github.com/alexjc/neural-doodle/issues/61>`_ or `Amazon Image <https://github.com/alexjc/neural-doodle/issues/54>`_ **(beginner)**
1. `Linux Installation of Lasagne <https://github.com/Lasagne/Lasagne/wiki/From-Zero-to-Lasagne-on-Ubuntu-14.04>`_ **(recommended)**
1. `Linux Installation of Lasagne <https://github.com/Lasagne/Lasagne/wiki/From-Zero-to-Lasagne-on-Ubuntu-14.04>`_ **(beginner)**
2. `Mac OSX Installation of Lasagne <http://deeplearning.net/software/theano/install.html#mac-os>`_ **(intermediate)**
3. `Windows Installation of Lasagne <https://github.com/Lasagne/Lasagne/wiki/From-Zero-to-Lasagne-on-Windows-7-%2864-bit%29>`_ **(expert)**

Expand Down
4 changes: 2 additions & 2 deletions docker-cpu.df
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ RUN apt-get update -qq && \
"python3-networkx" \
"python3-tk" && \
rm -rf /var/lib/apt/lists/* && \
python3 -m pip install "cython"
python3 -m pip -q install "cython"

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

# Copy only required project files
COPY doodle.py .
Expand Down
4 changes: 2 additions & 2 deletions docker-gpu.df
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ RUN apt-get update -qq && \
"python3-networkx" \
"python3-tk" && \
rm -rf /var/lib/apt/lists/* && \
python3 -m pip install "cython"
python3 -m pip -q install "cython"

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

# Copy only required project files
COPY doodle.py .
Expand Down

0 comments on commit 195e393

Please sign in to comment.