Refactor dockerfile and entrypoint script

This commit is contained in:
2026-02-18 22:55:13 -03:00
parent 5366d4045e
commit 7018ff9d07
5 changed files with 57 additions and 134 deletions
+26
View File
@@ -0,0 +1,26 @@
#!/bin/bash
set -e
CKPT_DIR="/piper/lightning_logs"
CKPT=""
if compgen -G "${CKPT_DIR}/version_*/checkpoints/*.ckpt" > /dev/null; then
CKPT=$(ls -t ${CKPT_DIR}/version_*/checkpoints/*.ckpt | head -n1)
RESUME_ARG="--trainer.resume_from_checkpoint $CKPT"
echo "Resuming: $CKPT"
fi
exec python3 -m piper.train fit \
--data.voice_name pt_BR-well \
--data.espeak_voice pt-br \
--data.audio_dir /data/wav/ \
--data.batch_size 16 \
--data.cache_dir /data/.cache/ \
--data.config_path /data/config.json \
--data.csv_path /data/metadata.csv \
--model.sample_rate 22050 \
--trainer.check_val_every_n_epoch 1 \
--trainer.max_epochs 10000 \
$RESUME_ARG