Docker Images

We provide prebuilt docker images to let you 1) quickly try out Lorien, 2) refer the environment set up, and 3) use it for AWS batch containers. You can find them on Docker Hub. We currently only provide prebuilt images for Ubuntu 18.04 on CPU and GPU platforms. The docker images include dependent packages and nightly built TVM. If you prefer other platforms or OS and is willing to make one, refer to Contribute to Lorien to file a pull request.

First of all, you need to set up docker (or nvidia-docker if you want to use cuda). In the rest of this guide, we will focus on the CPU platform, but you should be able to get the GPU platform working with exactly the same steps with nvidia-docker.

Let's first pull the docker image from Docker Hub. Note that you may need sudo for all docker comamnds in this guide if you do not configure your docker permission.

docker pull comaniac0422/lorien:ubuntu-18.04-<the latest version>

Now the docker image is available on your machine. We then create a container and log in it using the provided script (run it in the Lorien root directory):

cd docker; ./bash.sh comaniac0422/lorien:ubuntu-18.04-<the latest version>

You can get the script by cloning Lorien, or copy it from bash.sh. The bash.sh script creates a container with the given docker image and execute a command. If no command is provided as shown in the above example, then it launches a bash shell for you to interact with. Note that your AWS credential on the host machine will not be available in a docker container, so you have to specify them in environment variables if you want Lorien to access AWS services (e.g., S3, DynamoDB, batch). bash.sh will set up an AWS credential in container according to the following environment variables.

export AWS_REGION="us-west-1"
export AWS_ACCESS_KEY="OOOOXXX"
export AWS_SECRET_ACCESS_KEY="XXXYYY"
cd docker; ./bash.sh comaniac0422/lorien:ubuntu-18.04-v0.01

After you login the container, you can clone and install Lorien (the prebuilt docker images do not have Lorien deployed as it is used for CI).

git clone https://github.com/comaniac/lorien.git
python3 setup.py install

That's all. You can now use Lorien! Try out some commands in Lorien README and have fun.

Docker Files

Check out docker files for Lorien docker files if you want to build your own docker images for your platform or newer dependencies.