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

Commit b706599

Browse files
committed
Fix alias for bash and zsh, Closes #54. Add standalone alias-free docker example, Closes #46.
1 parent c03a0b7 commit b706599

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

README.rst

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,19 @@ Pre-trained models are provided in the GitHub releases. Training your own is a
9494

9595
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.
9696

97-
**Single Image** — We suggest you setup an alias called ``enhance`` to automatically expose the folder containing your specified image, so the script can read it and store results where you can access them. This is how you can do it in your terminal console on OSX or Linux:
97+
Here's the simplest way you can call the script using ``docker``, assuming you're familiar with using ``-v` to mount folders you can use this directly to specify files to enhance:
98+
99+
.. code:: bash
100+
101+
# Download the Docker image and show the help text to make sure it works.
102+
docker run --rm -v `pwd`:/ne/input -it alexjc/neural-enhance --help
103+
104+
**Single Image** — In practice, we suggest you setup an alias called ``enhance`` to automatically expose the folder containing your specified image, so the script can read it and store results where you can access them. This is how you can do it in your terminal console on OSX or Linux:
98105

99106
.. code:: bash
100107
101108
# Setup the alias. Put this in your .bashrc or .zshrc file so it's available at startup.
102-
alias enhance='function ne() { docker run --rm -v "$(pwd)/`dirname ${@:$#}`":/ne/input -it alexjc/neural-enhance ${@:1:-1} "input/`basename ${@:$#}`"; }; ne'
109+
alias enhance='function ne() { docker run --rm -v "$(pwd)/`dirname ${@:$#}`":/ne/input -it alexjc/neural-enhance ${@:1:$#-1} "input/`basename ${@:$#}`"; }; ne'
103110
104111
# Now run any of the examples above using this alias, without the `.py` extension.
105112
enhance --zoom=1 --model=small images/example.jpg

0 commit comments

Comments
 (0)