fix: install into existing venv instead of recreating it

The nousresearch/hermes-agent:latest base image already has a
venv with hermes-agent installed at /opt/hermes/.venv/.
Running 'uv venv' on top of it either fails or wipes the
existing install.

Fix: activate the existing venv first, then pip install into it.
This commit is contained in:
Thierry Pouplier
2026-05-09 17:44:55 +00:00
parent 98216d2872
commit 6f17743667

View File

@@ -22,8 +22,10 @@ WORKDIR /opt/hermes
# ---------- Hermes venv ---------- # ---------- Hermes venv ----------
USER hermes USER hermes
# ---------- Python virtualenv avec Piper TTS ---------- # ---------- Piper TTS dans le venv existant ----------
RUN uv venv && \ # Le venv existe déjà dans l'image de base (hermes-agent installé).
# On ajoute simplement Piper et ses dépendences.
RUN . /opt/hermes/.venv/bin/activate && \
uv pip install --no-cache-dir piper-tts sounddevice numpy uv pip install --no-cache-dir piper-tts sounddevice numpy
# ---------- Télécharger la voix Piper Ryan (high quality) ---------- # ---------- Télécharger la voix Piper Ryan (high quality) ----------