fix: Dockerfile heredoc for voice download instead of multi-line -c
This commit is contained in:
@@ -44,13 +44,13 @@ RUN uv venv && \
|
|||||||
|
|
||||||
# ---------- Télécharger la voix Piper Ryan ----------
|
# ---------- Télécharger la voix Piper Ryan ----------
|
||||||
RUN mkdir -p /opt/hermes/.venv/share/piper/voices && \
|
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
|
import urllib.request
|
||||||
base = '/opt/hermes/.venv/share/piper/voices'
|
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'
|
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, 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 + '.json', base + '/en_US-ryan-high.onnx.json')
|
||||||
"
|
PYEOF
|
||||||
|
|
||||||
# ---------- Patch tts_tool.py: replace Edge TTS fallback with Piper ----------
|
# ---------- Patch tts_tool.py: replace Edge TTS fallback with Piper ----------
|
||||||
COPY ai/patch_tts_tool.py /tmp/patch_tts_tool.py
|
COPY ai/patch_tts_tool.py /tmp/patch_tts_tool.py
|
||||||
|
|||||||
Reference in New Issue
Block a user