psr commited on
Commit
9afafc6
·
1 Parent(s): c018bfc

docker: add training script

Browse files
Files changed (1) hide show
  1. train-docker.sh +15 -0
train-docker.sh ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ CMD="python3 ./src/train.py --yaml $1"
3
+ # ipc host is one way to increase the shared memory for the container
4
+ # more info here https://github.com/pytorch/pytorch#docker-image
5
+ CPATH="/home/user/ai-voice-cloning"
6
+ docker run --rm --gpus all \
7
+ --mount "type=bind,src=$PWD/models,dst=$CPATH/models" \
8
+ --mount "type=bind,src=$PWD/training,dst=$CPATH/training" \
9
+ --mount "type=bind,src=$PWD/voices,dst=$CPATH/voices" \
10
+ --mount "type=bind,src=$PWD/bin,dst=$CPATH/bin" \
11
+ --mount "type=bind,src=$PWD/src,dst=$CPATH/src" \
12
+ --workdir $CPATH \
13
+ --ipc host \
14
+ --user "$(id -u):$(id -g)" \
15
+ -it ai-voice-cloning $CMD