Notter7 commited on
Commit
818dd70
·
verified ·
1 Parent(s): 6dae53a

Add startup diagnostics for Russian GPT-SoVITS

Browse files
Files changed (1) hide show
  1. Dockerfile +34 -1
Dockerfile CHANGED
@@ -2,10 +2,13 @@ FROM continuumio/miniconda3:24.7.1-0
2
 
3
  ENV DEBIAN_FRONTEND=noninteractive \
4
  PYTHONUNBUFFERED=1 \
 
5
  PIP_NO_CACHE_DIR=1 \
6
  is_half=False \
7
  is_share=False \
8
  HF_HOME=/data/.cache/huggingface \
 
 
9
  TERM=xterm
10
 
11
  SHELL ["/bin/bash", "-lc"]
@@ -63,5 +66,35 @@ RUN mkdir -p GPT_SoVITS/pretrained_models/v2Pro GPT_weights_v2ProPlus SoVITS_wei
63
  curl -L --retry 5 -o SoVITS_weights_v2ProPlus/ru-base_e10_s123570.pth \
64
  https://huggingface.co/fuckSelf/GPT-SoVITS-Russian/resolve/main/ru-base_e10_s123570.pth
65
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
66
  EXPOSE 7860
67
- CMD ["bash", "-lc", "source /opt/conda/etc/profile.d/conda.sh && conda activate GPTSoVits && python webui.py"]
 
2
 
3
  ENV DEBIAN_FRONTEND=noninteractive \
4
  PYTHONUNBUFFERED=1 \
5
+ PYTHONFAULTHANDLER=1 \
6
  PIP_NO_CACHE_DIR=1 \
7
  is_half=False \
8
  is_share=False \
9
  HF_HOME=/data/.cache/huggingface \
10
+ GRADIO_SERVER_NAME=0.0.0.0 \
11
+ GRADIO_SERVER_PORT=7860 \
12
  TERM=xterm
13
 
14
  SHELL ["/bin/bash", "-lc"]
 
66
  curl -L --retry 5 -o SoVITS_weights_v2ProPlus/ru-base_e10_s123570.pth \
67
  https://huggingface.co/fuckSelf/GPT-SoVITS-Russian/resolve/main/ru-base_e10_s123570.pth
68
 
69
+ RUN cat > /app/start-space.sh <<'SH'
70
+ #!/usr/bin/env bash
71
+ set -euxo pipefail
72
+ source /opt/conda/etc/profile.d/conda.sh
73
+ conda activate GPTSoVits
74
+ cd /app
75
+
76
+ echo "=== GPT-SoVITS Space startup ==="
77
+ python - <<'PY'
78
+ from pathlib import Path
79
+ checks = [
80
+ 'config.py',
81
+ 'GPT_SoVITS/pretrained_models/s1v3-ru.ckpt',
82
+ 'GPT_SoVITS/pretrained_models/v2Pro/s2Gv2ProPlus-rus.pth',
83
+ 'GPT_weights_v2ProPlus/ru-base-e20.ckpt',
84
+ 'SoVITS_weights_v2ProPlus/ru-base_e10_s123570.pth',
85
+ ]
86
+ for item in checks:
87
+ path = Path(item)
88
+ print(f'{item}: exists={path.exists()} size={path.stat().st_size if path.exists() else 0}', flush=True)
89
+ for line in Path('config.py').read_text().splitlines():
90
+ if 'webui_port_main' in line or 's1v3' in line or 's2Gv2ProPlus' in line:
91
+ print(line, flush=True)
92
+ PY
93
+
94
+ echo "=== Launching webui.py on port ${GRADIO_SERVER_PORT} ==="
95
+ exec python -u webui.py
96
+ SH
97
+ RUN chmod +x /app/start-space.sh
98
+
99
  EXPOSE 7860
100
+ CMD ["/app/start-space.sh"]