Files
esh-pfi-infrastructure/stacks/omnivoice/entrypoint.sh
T
vh 984b72757f feat(omnivoice): new TTS stack — k2-fsa/OmniVoice on irv-ml1 3090
Zero-shot, massively-multilingual (600+ language) voice-cloning + voice-design
TTS (diffusion-LM, Apache-2.0). No official image, so a thin CUDA container
around the pip package running upstream's own Gradio demo (no FastAPI wrapper).
Pinned to GPU 0 (3090) — the A6000 is ComfyUI-exclusive — port 8199. Built +
verified live on irv-ml1 (Gradio 200, container healthy). Surface is the Gradio
UI + Gradio API, NOT OpenAI-compat /v1/audio/speech (wrap later if asset-engine
should consume it). deploy-omnivoice.yaml builds local + verifies.
2026-06-18 22:25:54 -07:00

30 lines
922 B
Bash

#!/usr/bin/env bash
# entrypoint.sh — pre-warm OmniVoice weights (k2-fsa/OmniVoice) into the
# persistent HF cache on first run, then exec the Gradio demo.
#
# The demo also auto-downloads on first synth, so the pre-warm is
# best-effort (NON-FATAL): it just makes the first generation fast +
# deterministic and lets the healthcheck come up against a ready model.
set -e
: "${HF_HOME:=/app/hf_cache}"
export HF_HOME
mkdir -p "${HF_HOME}"
MARKER="${HF_HOME}/.omnivoice-prewarmed"
if [ ! -f "${MARKER}" ]; then
echo "[omnivoice] pre-warming k2-fsa/OmniVoice weights into ${HF_HOME} (one-time)…"
if python3 - <<'EOF'
from huggingface_hub import snapshot_download
snapshot_download(repo_id="k2-fsa/OmniVoice")
print("[omnivoice] pre-warm complete")
EOF
then
touch "${MARKER}"
else
echo "[omnivoice] pre-warm failed (non-fatal) — demo will download on first synth"
fi
fi
exec "$@"