From 9afafc69c19233fe5501e52d69134e9dc9ef3a2b Mon Sep 17 00:00:00 2001 From: psr Date: Fri, 7 Apr 2023 23:15:13 +0000 Subject: [PATCH] docker: add training script --- train-docker.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 train-docker.sh diff --git a/train-docker.sh b/train-docker.sh new file mode 100755 index 0000000..cd19b1a --- /dev/null +++ b/train-docker.sh @@ -0,0 +1,15 @@ +#!/bin/bash +CMD="python3 ./src/train.py --yaml $1" +# ipc host is one way to increase the shared memory for the container +# more info here https://github.com/pytorch/pytorch#docker-image +CPATH="/home/user/ai-voice-cloning" +docker run --rm --gpus all \ + --mount "type=bind,src=$PWD/models,dst=$CPATH/models" \ + --mount "type=bind,src=$PWD/training,dst=$CPATH/training" \ + --mount "type=bind,src=$PWD/voices,dst=$CPATH/voices" \ + --mount "type=bind,src=$PWD/bin,dst=$CPATH/bin" \ + --mount "type=bind,src=$PWD/src,dst=$CPATH/src" \ + --workdir $CPATH \ + --ipc host \ + --user "$(id -u):$(id -g)" \ + -it ai-voice-cloning $CMD