This commit is contained in:
wataru 2022-09-23 17:40:51 +09:00
parent 36c9edab21
commit 493d6ae97b
4 changed files with 16 additions and 10 deletions

View File

@ -2,9 +2,9 @@
# 参考:https://programwiz.org/2022/03/22/how-to-write-shell-script-for-option-parsing/
DOCKER_IMAGE=dannadori/voice-changer:20220923_143426
DOCKER_IMAGE=dannadori/voice-changer:20220923_173952
TENSORBOARD_PORT=6006
VOICE_CHANGER_PORT=8080
# VOICE_CHANGER_PORT=8080
set -eu
@ -27,6 +27,7 @@ usage:
-c: トレーニングで使用したConfigのファイル名です。(config)
-m: トレーニング済みのモデルのファイル名です。(model)
-g: GPU使用/不使用。デフォルトはonなのでGPUを使う場合は指定不要。(gpu)
-p: port番号
For help
$0 [-h]
-h: show this help
@ -47,11 +48,11 @@ voice_change_flag=false
config=
model=
gpu=on
port=8080
escape_flag=false
# オプション解析
while getopts tn:b:rvc:m:g:hx OPT; do
while getopts tn:b:rvc:m:g:p:hx OPT; do
case $OPT in
t)
training_flag=true
@ -77,6 +78,9 @@ while getopts tn:b:rvc:m:g:hx OPT; do
g)
gpu="$OPTARG"
;;
p)
port="$OPTARG"
;;
h | \?)
usage && exit 1
;;
@ -139,14 +143,14 @@ if $voice_change_flag; then
-v `pwd`/vc_resources:/resources \
-e LOCAL_UID=$(id -u $USER) \
-e LOCAL_GID=$(id -g $USER) \
-p ${VOICE_CHANGER_PORT}:8080 $DOCKER_IMAGE -v -c ${config} -m ${model}
-p ${port}:8080 $DOCKER_IMAGE -v -c ${config} -m ${model}
elif [ "${gpu}" = "off" ]; then
echo "CPUのみで稼働します。GPUは使用できません。"
docker run -it --shm-size=128M \
-v `pwd`/vc_resources:/resources \
-e LOCAL_UID=$(id -u $USER) \
-e LOCAL_GID=$(id -g $USER) \
-p ${VOICE_CHANGER_PORT}:8080 $DOCKER_IMAGE -v -c ${config} -m ${model}
-p ${port}:8080 $DOCKER_IMAGE -v -c ${config} -m ${model}
else
echo ${gpu}
warn "-g は onかoffで指定して下さい。"

View File

@ -4,8 +4,8 @@
"voice_changer_server_url": "/test",
"sample_rate": 48000,
"buffer_size": 1024,
"prefix_chunk_size": 24,
"chunk_size": 24,
"prefix_chunk_size": 36,
"chunk_size": 36,
"speaker_ids": [100, 107, 101, 102, 103],
"speaker_names": ["ずんだもん", "user", "そら", "めたん", "つむぎ"],
"src_id": 107,

View File

@ -1,4 +1,4 @@
FROM dannadori/voice-changer-internal:20220923_142757 as front
FROM dannadori/voice-changer-internal:20220923_153015 as front
FROM debian:bullseye-slim as base
ARG DEBIAN_FRONTEND=noninteractive
@ -30,6 +30,8 @@ RUN pip install pyopenjtalk==0.2.0
RUN pip install tensorboard==2.10.0
RUN pip install matplotlib==3.5.3
RUN pip install pyOpenSSL==22.0.0
WORKDIR /MMVC_Trainer/monotonic_align
RUN cythonize -3 -i core.pyx \
&& mv core.cpython-39-x86_64-linux-gnu.so monotonic_align/

View File

@ -129,5 +129,5 @@ if $voice_change_flag; then
echo "-----------!!"
echo $config $model
echo $model
python3 serverSIO.py 8080 $config $model
python3 serverSIO.py -p 8080 -c $config -m $model --https True --httpsSelfSigned True
fi