#!/usr/bin/env bash set -e # CosyVoice 워커(전용 venv)를 백그라운드로 기동 — 모델을 1회 로드해 상주 if [ -n "$COSYVOICE_URL" ] && [ -x /opt/cosyvoice-venv/bin/python ]; then echo "[entrypoint] starting CosyVoice worker on :8001" /opt/cosyvoice-venv/bin/python -m uvicorn worker:app \ --app-dir /opt/cosyvoice_worker \ --host 127.0.0.1 --port 8001 \ > /tmp/cosyvoice_worker.log 2>&1 & fi # 메인 앱(글로벌 파이썬, MeloTTS 인프로세스) echo "[entrypoint] starting main app on :8788" exec uvicorn app.server:app --host 0.0.0.0 --port 8788