Files
esh-pfi-infrastructure/stacks/dia/.env.example
T
vh 3139e81e8a feat(dia): two-instance Dia2 deployment (dia2-1b + dia2-2b)
The devnen wrapper is single-model and ignores the OpenAI model field, so
offering both Dia2 models to asset-engine as real per-request choices means
one fixed-model instance per model. Rework the dia stack to run two services
from a dia2-capable image:
  * dia2-2b (:8200, best quality), dia2-1b (:8202, streaming) — both GPU 0
  * each pins its model via a mounted /opt/docker/conf/dia2-*/config.yaml
Retire the legacy Dia 1.6B service.

New dia2-image/Dockerfile builds local/dia:v2 = upstream devnen wrapper +
the dia2 package (copied into site-packages; its pyproject build backend
yields an empty UNKNOWN wheel under the base's old setuptools) + the three
missing runtime deps (transformers/sphn/whisper-timestamped); torch 2.12 /
numpy 2.2 in the base already satisfy Dia2. Both instances verified
end-to-end (HTTP 200, Ogg/Opus 24 kHz).
2026-05-31 14:41:11 -07:00

42 lines
2.3 KiB
Bash

# Dia2 stack tunables. Copy to `.env` on irv-ml1 before deploying.
# Two fixed-model instances (dia2-2b, dia2-1b) from the dia2-capable image.
# ── image ────────────────────────────────────────────────────────────
# Built in two stages (see README + dia2-image/Dockerfile):
# upstream devnen wrapper -> local/dia:v1
# + dia2 package & its missing deps -> local/dia:v2 (this tag)
# Bump when you change the derived build context.
DIA_TAG=v2
# ── network ──────────────────────────────────────────────────────────
# Each container listens on 8003 internally. Reserved on irv-ml1:
# 8188 ComfyUI, 8190 CosyVoice, 8191 Qwen3-TTS, 8192 IndexTTS-2,
# 8193 Kokoro, 8194 VibeVoice, 8195 Fish-S2, 8196 Chatterbox,
# 8197 Voxtral, 8198 Kyutai, 8199 Zonos(gradio), 8200 Dia2-2B,
# 8201 csm, 8202 Dia2-1B, 8203 zonos-api, 8765 Parakeet.
DIA2_2B_PORT=8200
DIA2_1B_PORT=8202
# Bind address. 0.0.0.0 exposes on all interfaces (incl. the WG tunnel
# interface 10.100.79.3); 127.0.0.1 restricts to local-only.
DIA_BIND=0.0.0.0
# ── runtime / GPU ────────────────────────────────────────────────────
# Both Dia2 models are small enough to share the RTX 3090 (device 0).
# Set either to "1" to move it to the A6000 if the 3090 gets crowded.
DIA2_2B_GPU=0
DIA2_1B_GPU=0
# ── per-instance config (pins model.repo_id) ─────────────────────────
# conf-convention path (lkraven-owned, no sudo). Each file is a full
# config.yaml with model.repo_id set to that instance's Dia2 model.
DIA2_2B_CONFIG=/opt/docker/conf/dia2-2b/config.yaml
DIA2_1B_CONFIG=/opt/docker/conf/dia2-1b/config.yaml
# ── persistent storage on the host (shared by both instances) ────────
# Reference audio for cloning / speaker prompts (included in restic).
DIA_REFERENCE_DIR=/worktank/dia/reference_audio
# HuggingFace cache — Dia2 checkpoints land here on first start. Shared
# cache is fine (keyed per repo). Excluded from restic (regenerable).
DIA_CACHE_DIR=/worktank/dia/cache