Skip to content

Latest commit

 

History

History
17 lines (10 loc) · 1.18 KB

docker.md

File metadata and controls

17 lines (10 loc) · 1.18 KB

To run the experiments inside a docker container, the following commands should be run in the docker directory.

First, install docker CE (engine) and nvidia-docker. If you want to run without sudo, [add yourself to the docker group](sudo usermod -a -G docker <user> && reboot). Otherwise run sudo before each command below:

docker build --network=host -t baseline -f Dockerfile ../
nvidia-docker run --net=host -v /data:/data:ro -it baseline bash

We assume all necessary files (datasests, embeddings etc.) are stored in /data/ in your machine.

For convenience, we also provide a build script, and a run script. The usual pipeline is this:

  • build a docker image: ./build_docker.sh tf or ./build_docker.sh pyt

  • run the container: ./run_docker.sh -g <gpu_number> -n <container_name> -t <image_type> -e <external directories to mount>, eg. ./run_docker.sh -g 0 -n test -t tf -e ~/test or ./run_docker.sh -g 0 -n test -t pyt -e ~/test ~/test1/. An external directory /a/b/c is mounted as /c in the docker.