How to run with DeeplyTough with docker-compose
- Install Docker Engine 19 or later
- Install Docker Compose
- Install NVIDIA Container toolkit, including essential package
nvidia-docker2
- Add your user to docker group
usermod -aG docker $USER
Use pacman and AUR if installing for Arch linux.
Test your installation by
docker run --rm --gpus all nvidia/cuda:9.0-cudnn7-runtime-ubuntu16.04 nvidia-smi
You should see all your GPUs in nvidia-smi
.
git clone https://github.com/BenevolentAI/DeeplyTough
docker-compose build
mkdir -p datasets
export STRUCTURE_DATA_DIR=$(pwd)/datasets
./DeeplyTough/datasets_downloader.sh
Wait some time for downloading....
Create results folder
mkdir -p results
If you need any of results from repository, just copy them to this folder.
If you need custom network models, create networks
folder and uncomment the corresponding volume in YAML file.
Execute any commands interactively.
docker-compose run --rm deeplytough
source activate deeplytough
python <your command>
docker-compose -f docker-compose-batch.yml run --rm deeplytough
Edit command in YAML file for you needs.
You can run program in background, and it will restart automatically if failed.
docker-compose -f docker-compose-batch.yml up -d
docker-compose logs
docker-compose -f docker-compose-batch.yml down
If you do not want to build container by yourself, you can use container from GitHub Docker Registry.
- (Optional) Install
docker-credential-secretservice
to store your passwords securely. - Obtain a GitHub token https://github.com/settings/tokens/new with
read:packages
permission - Save your token to file
token.txt
- Login to registry by command:
cat token.txt | docker login https://docker.pkg.github.com -u <your username> --password-stdin
- Run batch version with container from repository:
docker-compose -f docker-compose-repo.yml run --rm deeplytough