1
0

docker: add training script

This commit is contained in:
psr 2023-04-07 23:15:13 +00:00
parent c018bfca9c
commit 9afafc69c1

15
train-docker.sh Executable file
View File

@ -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