# Kokoro-FastAPI stack tunables. Copy to `.env` on irv-ml1 before deploying.

# ── image pin ────────────────────────────────────────────────────────
# Image variant. Two choices:
#   gpu — default. Requires NVIDIA driver supporting CUDA >= 12.9.
#         irv-ml1's driver bumped 2026-04-25 from 570.124.06 → 595.58.03
#         (CUDA 13.2), so the gpu variant runs there. ~300ms TTFA.
#   cpu — fallback for any host without GPU passthrough. Kokoro is
#         tiny (82M params) so CPU inference is workable: TTFA ~1s vs
#         ~300ms on GPU.
KOKORO_VARIANT=gpu

# Tagged release on GHCR. Avoid `latest` — upstream warns it can move
# without notice. v0.2.4-master = 2025-12-13 release with Kokoro-82M v1.0
# baked in (commit 9901c2b).
KOKORO_TAG=v0.2.4-master

# ── network ──────────────────────────────────────────────────────────
# Host port. Container listens on 8880 internally.
# Reserved on irv-ml1: 8188 ComfyUI, 8190 CosyVoice, 8191 Qwen3-TTS,
# 8192 IndexTTS-2, 8765 Parakeet. 8193 picked here.
KOKORO_PORT=8193

# 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.
KOKORO_BIND=0.0.0.0

# ── runtime / GPU ────────────────────────────────────────────────────
# Only used when KOKORO_VARIANT=gpu. Leave empty for the cpu variant.
# When using the gpu variant: "0" pins to the RTX 3090 (Kokoro is tiny
# — ~1 GB VRAM — and doesn't need the A6000); "all" exposes both.
KOKORO_GPU_DEVICES=0

# Tells the wrapper to route inference through CUDA. Must be `false`
# for the cpu variant (it has no CUDA libraries) and `true` for gpu.
KOKORO_USE_GPU=true

# Logging level for the FastAPI app. INFO is the upstream default.
KOKORO_LOG_LEVEL=INFO

# ── persistent storage on the host ───────────────────────────────────
# Voicepacks dir — bind-mount target IF the (commented-out) override
# is enabled in compose.yaml. Default: leave empty and use the
# in-image voicepacks.
KOKORO_VOICES_DIR=/worktank/kokoro/voices

# User-voices dir — a parallel directory the wrapper *also* scans for
# voicepacks alongside the in-image ones. Always mounted (cheap, empty
# by default). Drop your own .pt files here if you train Kokoro voices.
KOKORO_USER_VOICES_DIR=/worktank/kokoro/user_voices
