From b18217fcdd55ac2978ed0d88db974e3f352cd7a2 Mon Sep 17 00:00:00 2001 From: javis-bot Date: Sun, 14 Jun 2026 02:26:24 +0900 Subject: [PATCH] fix: let melo-worker honour MELO_DEVICE from env (was hardcoded cpu) supervisord hardcoded MELO_DEVICE=cpu, overriding the compose MELO_DEVICE=cuda so MeloTTS stayed on CPU even after the GPU torch swap. Interpolate the container env instead. Co-Authored-By: Claude Opus 4.7 --- docker/supervisord.conf | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docker/supervisord.conf b/docker/supervisord.conf index 0e7d814..c2e8ea7 100644 --- a/docker/supervisord.conf +++ b/docker/supervisord.conf @@ -61,7 +61,10 @@ directory=/app ; HF_HUB_OFFLINE/TRANSFORMERS_OFFLINE force pure-cache reads: the pinned old ; transformers/huggingface_hub otherwise retry the network on every load and ; error out instead of falling back to the (complete) baked cache. -environment=MELO_LANGUAGE="KR",MELO_SPEED="1.5",MELO_DEVICE="cpu",MELO_WORKER_HOST="127.0.0.1",MELO_WORKER_PORT="8770",HF_HOME="/opt/melo-cache",HF_HUB_OFFLINE="1",TRANSFORMERS_OFFLINE="1" +; MELO_DEVICE inherits from the container env (compose sets it; default cuda) +; so the worker runs MeloTTS on the GPU. supervisord interpolates %(ENV_x)s +; from its own environment, which is the container's. +environment=MELO_LANGUAGE="KR",MELO_SPEED="1.5",MELO_DEVICE="%(ENV_MELO_DEVICE)s",MELO_WORKER_HOST="127.0.0.1",MELO_WORKER_PORT="8770",HF_HOME="/opt/melo-cache",HF_HUB_OFFLINE="1",TRANSFORMERS_OFFLINE="1" priority=280 autorestart=true stdout_logfile=/dev/stdout