Skip to content
This repository has been archived by the owner on Jan 2, 2021. It is now read-only.

Commit

Permalink
Add docker instructions, fix for slow compute in CPU image.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexjc committed Oct 30, 2016
1 parent 74cb956 commit 2b5fc8f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
15 changes: 14 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,20 @@ Pre-trained models are provided in the GitHub releases. Training your own is a
2.a) Using Docker Image [recommended]
-------------------------------------

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

We recommend you setup an alias called ``enhance`` to automatically expose your ``images`` folder from the current directory so the script can access files and store results where you can access them. 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 enhance="docker run -v $(pwd)/images:/ne/images -it alexjc/neural-enhance"
# Now run any of the examples above using this alias, without the `.py` extension.
enhance images/example.jpg
If you want to run on your NVIDIA GPU, you can instead use the image ``alexjc/neural-enhance:gpu`` which comes with CUDA and CUDNN pre-installed in the image. Then run it within `nvidia-docker <https://github.com/NVIDIA/nvidia-docker>`_ and it should use your physical hardware!


2.b) Manual Installation [developers]
-------------------------------------
Expand Down
4 changes: 3 additions & 1 deletion docker-cpu.df
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ RUN apt-get -qq update && \
"build-essential" \
"git" \
"wget" \
"libopenblas-dev" \
"liblapack-dev" \
"pkg-config" && \
rm -rf /var/lib/apt/lists/*

Expand All @@ -28,5 +30,5 @@ RUN wget -q "https://github.com/alexjc/neural-enhance/releases/download/v0.1/ne4
RUN wget -q "https://github.com/alexjc/neural-enhance/releases/download/v0.1/ne4x-medium-0.1.pkl.bz2"
RUN wget -q "https://github.com/alexjc/neural-enhance/releases/download/v0.1/ne4x-large-0.1.pkl.bz2"

# Set an entrypoint to the main doodle.py script
# Set an entrypoint to the main enhance.py script
ENTRYPOINT ["/opt/conda/bin/python3.5", "enhance.py", "--device=cpu"]
2 changes: 1 addition & 1 deletion docker-gpu.df
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ RUN wget -q "https://github.com/alexjc/neural-enhance/releases/download/v0.1/ne4
RUN wget -q "https://github.com/alexjc/neural-enhance/releases/download/v0.1/ne4x-medium-0.1.pkl.bz2"
RUN wget -q "https://github.com/alexjc/neural-enhance/releases/download/v0.1/ne4x-large-0.1.pkl.bz2"

# Set an entrypoint to the main doodle.py script
# Set an entrypoint to the main enhance.py script
ENTRYPOINT ["/opt/conda/bin/python3.5", "enhance.py", "--device=gpu"]

0 comments on commit 2b5fc8f

Please sign in to comment.