7c560a67fb
Three fixes from the first deploy attempt on irv-ml1: - build.target=production. Upstream Dockerfile is multistage; the last stage `cpu-base` was selected by default, producing a CPU-only image with no flash-attn and `torch ... whl/cpu`. - user: "0:0". Upstream image declares USER appuser but writes runtime state under /root (mode 0700). appuser cannot traverse /root, so /v1/voices 500s on PermissionError. Run as root to sidestep. - QWEN3_TTS_MODEL=Qwen/Qwen3-TTS-12Hz-1.7B-CustomVoice. The bare `1.7B` id we had isn't a real HF identifier; upstream publishes -CustomVoice / -Base variants of each size. Use -CustomVoice so `voice="clone:<name>"` works. Tag bumped to v2 to keep the v1 cpu image distinguishable in the local registry. After: all 5 verify steps pass, GPU synthesis ~5s for 3-4s of audio, three contrasting English `instructions` produce three distinct hashes — emotion steering actually works (unlike CosyVoice's English path).
59 lines
3.0 KiB
Bash
59 lines
3.0 KiB
Bash
# Qwen3-TTS stack tunables. Copy to `.env` on irv-ml1 before deploying.
|
||
|
||
# ── build pin ────────────────────────────────────────────────────────
|
||
# SHA of groxaxo/Qwen3-TTS-Openai-Fastapi to build from. Bump + rebuild
|
||
# when you want upstream wrapper updates.
|
||
QWEN3_TTS_SHA=10323ce778c48a75dbda93d0a4891983fb371f58
|
||
|
||
# Local image tag — bump when you change build context to force a
|
||
# fresh layer build. v2 = first GPU build (target=production); v1
|
||
# was the accidental CPU-only image (last stage of upstream's
|
||
# multi-stage Dockerfile).
|
||
QWEN3_TTS_TAG=v2
|
||
|
||
# ── network ──────────────────────────────────────────────────────────
|
||
# Host port (container listens on 8880 internally).
|
||
QWEN3_TTS_PORT=8191
|
||
|
||
# Bind address. 0.0.0.0 exposes on all interfaces (incl. WG tunnel
|
||
# interface 10.100.79.3); 127.0.0.1 restricts to local-only.
|
||
QWEN3_TTS_BIND=0.0.0.0
|
||
|
||
# ── runtime ──────────────────────────────────────────────────────────
|
||
# Inference backend. `official` = default upstream; `optimized` =
|
||
# faster but slightly less robust; `vllm_omni` = vLLM-backed (needs
|
||
# more VRAM); `pytorch` = bare pytorch path.
|
||
QWEN3_TTS_BACKEND=official
|
||
|
||
# Model variant. Upstream publishes four checkpoints on HF:
|
||
# Qwen/Qwen3-TTS-12Hz-1.7B-CustomVoice — flagship, voice cloning
|
||
# Qwen/Qwen3-TTS-12Hz-1.7B-Base — flagship, no cloning
|
||
# Qwen/Qwen3-TTS-12Hz-0.6B-CustomVoice — lightweight, voice cloning
|
||
# Qwen/Qwen3-TTS-12Hz-0.6B-Base — lightweight, no cloning
|
||
# 1.7B = ~6–8 GB VRAM bfloat16, best quality. 0.6B = ~2–3 GB.
|
||
# Use -CustomVoice for `voice="clone:<name>"` to work.
|
||
QWEN3_TTS_MODEL=Qwen/Qwen3-TTS-12Hz-1.7B-CustomVoice
|
||
|
||
# Warm the model on container start so the first synthesis request
|
||
# doesn't pay the load latency. Adds ~30 s to startup. Recommended.
|
||
QWEN3_TTS_WARMUP=true
|
||
|
||
# Concurrency cap on synthesis requests. Single GPU + 1.7B model →
|
||
# leave at 1 unless you're load-testing.
|
||
QWEN3_TTS_MAX_CONCURRENT=1
|
||
|
||
# Mount the gradio voice-studio UI at /voice-studio for browser-side
|
||
# voice cloning. Set "false" to disable for headless deployments.
|
||
QWEN3_TTS_VOICE_STUDIO=true
|
||
|
||
# ── persistent storage on the host ───────────────────────────────────
|
||
# HuggingFace cache (model weights, ~5 GB after first run). Bind-mounted
|
||
# so model state survives container recreate. Excluded from restic
|
||
# (regenerable from HF Hub).
|
||
QWEN3_TTS_CACHE_DIR=/worktank/qwen3-tts/cache
|
||
|
||
# Cloned voice profiles (meta.json + reference.wav per voice). Precious
|
||
# — cloned voices need the original reference audio to recreate.
|
||
# Included in restic.
|
||
QWEN3_TTS_VOICES_DIR=/worktank/qwen3-tts/voices
|