Herbie's is available through Docker, which is a sort of like an easily-scriptable virtual machine. This page describes how to install the official Docker image for Herbie.
Herbie can also be installed normally.
First, install
Docker. Docker supports Windows, OS X, and Linux. Depending on
how you install Docker, you may need to prefix
all docker
commands on this page
with sudo
or run them as the root or administrative
user.
With Docker installed, you should be able to download the Herbie image with:
docker pull uwplse/herbie
You can now run Herbie:
docker run -it uwplse/herbie shell
This will run the Herbie shell, reading input from the standard input.
To use Herbie in batch mode, you will need to mount the input in the Docker container. Do that with:
$ docker run -it \ -v in-dir:/in \ -v out-dir:/out \ -u $USER \ uwplse/herbie improve /in/in-file /out/out-file
In this command, you are asking Herbie to read input from in-file in in-dir, and write output to out-file in out-dir. The command looks the same if you want Herbie to read input from a directory; just leave in-file blank.
To generate reports from Herbie, you can run:
$ docker run -it \ -v in-dir:/in \ -v out-dir:/out \ -u $USER \ uwplse/herbie report /in/in-file /out/
As before, the input and output directories must be mounted inside the Docker container. Note that both here and above, the user is set to the current user. This is to ensure that the files Herbie creates have the correct permissions set.
Running the web shell in Docker requires exposing the ports inside
the container. Use the -p
option to Docker to expose
whatever ports Herbie chooses to use, and then use
the --port
option to Herbie to choose that port.
$ docker run -itp \ uwplse/herbie web --quiet
Note that the --quiet
flag is passed,
to prevent Herbie from attempting to start a web server
inside the Docker container.
If you are using the --log
or --save-session
flags for the web shell,
you will also need to mount the relevant directories into the
Docker container using the -v
Docker option, as in
the examples above.