diff --git a/docker_trainer/README.md b/docker_trainer/README.md index a3ec2269..abd29036 100644 --- a/docker_trainer/README.md +++ b/docker_trainer/README.md @@ -41,9 +41,9 @@ trainer/dataset/ └── multi_speaker_correspondence.txt ``` -(2) start.shをrootにコピー +(2) start_trainer.shをrootにコピー -(3) `bash start.sh`を実行 +(3) `bash start_trainer.sh`を実行 (4) Docker内で次のコマンドを実行 batch sizeは適宜調整 diff --git a/docker_trainer/start.sh b/docker_trainer/start_trainer.sh similarity index 80% rename from docker_trainer/start.sh rename to docker_trainer/start_trainer.sh index af33d4e8..46843d7b 100644 --- a/docker_trainer/start.sh +++ b/docker_trainer/start_trainer.sh @@ -1,3 +1,8 @@ +#!/bin/bash +set -eu + +DOCKER_IMAGE=dannadori/trainer:20230131_182050 + docker run --gpus all --rm -ti \ -v `pwd`/trainer/dataset:/MMVC_Trainer/dataset \ -v `pwd`/trainer/configs:/MMVC_Trainer/configs \ @@ -7,7 +12,7 @@ docker run --gpus all --rm -ti \ -v `pwd`/trainer/logs:/MMVC_Trainer/logs \ -v `pwd`/trainer/filelists:/MMVC_Trainer/filelists \ -p 5000:5000 \ - trainer /bin/bash + $DOCKER_IMAGE /bin/bash diff --git a/package.json b/package.json index ff528e71..7916ab7f 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "copy:backend": "docker run -v `pwd`/demo:/demo --entrypoint /bin/bash -ti voice-changer -c \"cp -r /voice-changer-internal/voice-change-service/* /demo/ && rm -rf /demo/MMVC_Trainer/.git && rm -rf /demo/MMVC_Trainer/.gitignore \"", "create:demo": "run-p copy:frontend copy:backend", "push:docker": "bash script/001_pushDocker.sh", + "push:docker:trainer": "bash script/002_pushDockerTrainer.sh", "test": "echo \"Error: no test specified\" && exit 1" }, "repository": { diff --git a/script/002_pushDockerTrainer.sh b/script/002_pushDockerTrainer.sh new file mode 100644 index 00000000..2b6b4fbb --- /dev/null +++ b/script/002_pushDockerTrainer.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +data_tag=`date +%Y%m%d_%H%M%S` +docker login + +docker tag trainer dannadori/trainer:$data_tag +docker push dannadori/trainer:$data_tag