diff --git a/docker/exec.sh b/docker/exec.sh index 67eed7da..12457060 100644 --- a/docker/exec.sh +++ b/docker/exec.sh @@ -1,8 +1,5 @@ #!/bin/bash -# 参考:https://programwiz.org/2022/03/22/how-to-write-shell-script-for-option-parsing/ - -#set -eux set -eu MODE=$1 @@ -31,32 +28,13 @@ if [ "${MODE}" = "MMVC" ] ; then find /resources/ -type f -name "config.json" | xargs -I{} sh -c 'echo "config.jsonをコピーします。" && cp {} ./' find /resources/ -type f -name "*.pth" | xargs -I{} sh -c 'echo "`basename {}`をコピーします。" && cp {} ./' - # if [ "${VERBOSE}" = "on" ]; then - # echo "MMVCを起動します(verbose)" - # python3 MMVCServerSIO.py $PARAMS - # else - # echo "MMVCを起動します" - # python3 MMVCServerSIO.py $PARAMS 2>stderr.txt - # fi echo "MMVCを起動します" - python3 MMVCServerSIO.py $PARAMS #2>stderr.txt + python3 MMVCServerSIO.py -t MMVC $PARAMS #2>stderr.txt -elif [ "${MODE}" = "MMVC_TRAIN" ] ; then +elif [ "${MODE}" = "TRAIN" ] ; then cd /voice-changer-internal/voice-change-service - # python3 create_dataset_jtalk.py -f train_config -s 24000 -m dataset/multi_speaker_correspondence.txt - # # date_tag=`date +%Y%m%d%H%M%S` - # sed -ie 's/80000/8000/' train_ms.py - # sed -ie "s/\"batch_size\": 10/\"batch_size\": $batch_size/" configs/train_config.json - # sed -ie "s/torch.cuda.device_count()/1/" train_ms.py python3 -m tensorboard.main --logdir /MMVC_Trainer/logs --port 6006 --host 0.0.0.0 & - python3 MMVCServerSIO.py $PARAMS - # if ${resume_flag}; then - # echo "トレーニング再開。バッチサイズ: ${batch_size}。" - # python3 train_ms.py -c configs/train_config.json -m vc - # else - # echo "トレーニング開始。バッチサイズ: ${batch_size}。" - # python3 train_ms.py -c configs/train_config.json -m vc -fg fine_model/G_180000.pth -fd fine_model/D_180000.pth - # fi + python3 MMVCServerSIO.py -t TRAIN $PARAMS fi diff --git a/docker/setup.sh b/docker/setup.sh index bfb1a877..5da2cef2 100644 --- a/docker/setup.sh +++ b/docker/setup.sh @@ -3,12 +3,10 @@ # 参考:https://programwiz.org/2022/03/22/how-to-write-shell-script-for-option-parsing/ set -eu -echo "1" # 実行ユーザ作成 USER_ID=${LOCAL_UID:-9001} GROUP_ID=${LOCAL_GID:-9001} -echo "2" echo "exec with [UID : $USER_ID, GID: $GROUP_ID]" useradd -u $USER_ID -o -m user groupmod -g $GROUP_ID user diff --git a/start2.sh b/start2.sh index 8856a1b2..c12f7214 100644 --- a/start2.sh +++ b/start2.sh @@ -1,7 +1,7 @@ #!/bin/bash set -eu -DOCKER_IMAGE=dannadori/voice-changer:20221112_102442 +DOCKER_IMAGE=dannadori/voice-changer:20221112_104247 # DOCKER_IMAGE=voice-changer if [ $# = 0 ]; then @@ -14,7 +14,6 @@ if [ $# = 0 ]; then fi MODE=$1 -PARAMS=${@:2:($#-1)} ### DEFAULT VAR ### DEFAULT_EX_PORT=18888 @@ -44,7 +43,7 @@ if [ "${MODE}" = "TRAIN" ]; then -e EX_PORT=${EX_PORT} -e EX_TB_PORT=${EX_TB_PORT} \ -e EX_IP="`hostname -I`" \ -p ${EX_PORT}:8080 -p ${EX_TB_PORT}:6006 \ - $DOCKER_IMAGE -t TRAIN "$@" + $DOCKER_IMAGE TRAIN "$@" elif [ "${MODE}" = "MMVC" ]; then @@ -58,7 +57,7 @@ elif [ "${MODE}" = "MMVC" ]; then -e EX_IP="`hostname -I`" \ -e EX_PORT=${EX_PORT} \ -p ${EX_PORT}:8080 \ - $DOCKER_IMAGE -t MMVC "$@" + $DOCKER_IMAGE MMVC "$@" else echo "MMVCを起動します(only cpu)" docker run -it --shm-size=128M \ @@ -68,7 +67,7 @@ elif [ "${MODE}" = "MMVC" ]; then -e EX_IP="`hostname -I`" \ -e EX_PORT=${EX_PORT} \ -p ${EX_PORT}:8080 \ - $DOCKER_IMAGE -t MMVC "$@" + $DOCKER_IMAGE MMVC "$@" fi else echo "