mirror of
https://github.com/w-okada/voice-changer.git
synced 2025-03-13 19:34:02 +03:00
WIP win
This commit is contained in:
parent
552303e075
commit
766de696db
4
start.sh
4
start.sh
@ -10,6 +10,4 @@ docker run -it --gpus all --shm-size=2g \
|
||||
-v `pwd`/vc_resources:/resources \
|
||||
-e LOCAL_UID=$(id -u $USER) \
|
||||
-e LOCAL_GID=$(id -g $USER) \
|
||||
-p 6008:6006 -p 8081:8080 mmvc_trainer_docker "$@"
|
||||
|
||||
|
||||
-p 6006:6006 -p 8080:8080 dannadori/voice-changer:20220823_085004 "$@"
|
||||
|
@ -48,6 +48,7 @@ COPY fine_model/D_180000.pth /MMVC_Trainer/fine_model/D_180000.pth
|
||||
### Copy from base
|
||||
COPY --from=base --chmod=777 /usr/local/lib/python3.9/dist-packages /usr/local/lib/python3.9/dist-packages
|
||||
COPY --from=base --chmod=777 /MMVC_Trainer /MMVC_Trainer
|
||||
RUN chmod 0777 /MMVC_Trainer
|
||||
|
||||
WORKDIR /MMVC_Trainer
|
||||
ADD /setup.sh /MMVC_Trainer/
|
||||
|
@ -40,8 +40,10 @@ voice_change_flag=false
|
||||
config=
|
||||
model=
|
||||
|
||||
escape_flag=false
|
||||
|
||||
# オプション解析
|
||||
while getopts tb:rvm:c:h OPT; do
|
||||
while getopts tb:rvc:m:hx OPT; do
|
||||
case $OPT in
|
||||
t)
|
||||
training_flag=true
|
||||
@ -64,13 +66,15 @@ while getopts tb:rvm:c:h OPT; do
|
||||
h | \?)
|
||||
usage && exit 1
|
||||
;;
|
||||
|
||||
x)
|
||||
escape_flag=true
|
||||
esac
|
||||
done
|
||||
|
||||
|
||||
## コマンドライン引数から、オプション引数分を削除
|
||||
# shift $((OPTIND - 1))
|
||||
|
||||
# ## コマンドライン引数から、オプション引数分を削除
|
||||
# # shift $((OPTIND - 1))
|
||||
|
||||
# モード解析
|
||||
if $training_flag && $voice_change_flag; then
|
||||
@ -80,6 +84,8 @@ elif $training_flag; then
|
||||
echo "■■■ ト レ ー ニ ン グ モ ー ド ■■■"
|
||||
elif $voice_change_flag; then
|
||||
echo "■■■ ボ イ チ ェ ン モ ー ド ■■■"
|
||||
elif $escape_flag; then
|
||||
/bin/bash
|
||||
else
|
||||
warn "-t(トレーニングモード) と -v(ボイチェンモード)のいずれかを指定してください。"
|
||||
exit 1
|
||||
@ -87,41 +93,41 @@ fi
|
||||
|
||||
|
||||
|
||||
if $training_flag; then
|
||||
# if $training_flag; then
|
||||
|
||||
|
||||
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
|
||||
# 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
|
||||
|
||||
python3 -m tensorboard.main --logdir logs --port 6006 --host 0.0.0.0 &
|
||||
# python3 -m tensorboard.main --logdir logs --port 6006 --host 0.0.0.0 &
|
||||
|
||||
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
|
||||
fi
|
||||
# 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
|
||||
# fi
|
||||
|
||||
if $voice_change_flag; then
|
||||
if [[ -z "$config" ]]; then
|
||||
warn "コンフィグファイル(-c)を指定してください"
|
||||
fi
|
||||
if [[ -z "$model" ]]; then
|
||||
warn "モデルファイル(-m)を指定してください"
|
||||
fi
|
||||
# if $voice_change_flag; then
|
||||
# if [[ -z "$config" ]]; then
|
||||
# warn "コンフィグファイル(-c)を指定してください"
|
||||
# fi
|
||||
# if [[ -z "$model" ]]; then
|
||||
# warn "モデルファイル(-m)を指定してください"
|
||||
# fi
|
||||
|
||||
cd /voice-changer-internal/voice-change-service
|
||||
# cd /voice-changer-internal/voice-change-service
|
||||
|
||||
cp -r /resources/* .
|
||||
if [[ -e ./setting.json ]]; then
|
||||
cp ./setting.json ../frontend/dist/assets/setting.json
|
||||
fi
|
||||
echo "-----------!!"
|
||||
echo $config $model
|
||||
echo $model
|
||||
python3 serverSIO.py 8080 $config $model
|
||||
fi
|
||||
# cp -r /resources/* .
|
||||
# if [[ -e ./setting.json ]]; then
|
||||
# cp ./setting.json ../frontend/dist/assets/setting.json
|
||||
# fi
|
||||
# echo "-----------!!"
|
||||
# echo $config $model
|
||||
# echo $model
|
||||
# python3 serverSIO.py 8080 $config $model
|
||||
# fi
|
||||
|
@ -15,6 +15,6 @@ groupmod -g $GROUP_ID user
|
||||
|
||||
#su user
|
||||
# echo "parameter: $@"
|
||||
# exec /usr/sbin/gosu user /bin/bash exec.sh "$@"
|
||||
/bin/bash
|
||||
exec /usr/sbin/gosu user /bin/bash exec.sh "$@"
|
||||
#/bin/bash
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user