fix: Dockerfile heredoc for voice download instead of multi-line -c

This commit is contained in:
Thierry Pouplier
2026-05-09 14:09:50 +00:00
parent 3f080da35e
commit 77fe8133ae

View File

@@ -44,13 +44,13 @@ RUN uv venv && \
# ---------- Télécharger la voix Piper Ryan ----------
RUN mkdir -p /opt/hermes/.venv/share/piper/voices && \
/opt/hermes/.venv/bin/python3 -c "
/opt/hermes/.venv/bin/python3 /dev/stdin << 'PYEOF' && rm -f /tmp/dl_voice.py
import urllib.request
base = '/opt/hermes/.venv/share/piper/voices'
url = 'https://huggingface.co/rhasspy/piper-voices/resolve/main/en/en_US/ryan/high/en_US-ryan-high.onnx'
urllib.request.urlretrieve(url + '?download=true', base + '/en_US-ryan-high.onnx')
urllib.request.urlretrieve(url + '.onnx.json?download=true', base + '/en_US-ryan-high.onnx.json')
"
urllib.request.urlretrieve(url, base + '/en_US-ryan-high.onnx')
urllib.request.urlretrieve(url + '.json', base + '/en_US-ryan-high.onnx.json')
PYEOF
# ---------- Patch tts_tool.py: replace Edge TTS fallback with Piper ----------
COPY ai/patch_tts_tool.py /tmp/patch_tts_tool.py