Files
vh 131d746c92 voxtral + kyutai-tts: fix wrong image tag / wrong endpoint paths; fish-s2: env-selectable model variant
Three fixes from the second-wave deploy attempts:

* voxtral: vllm/vllm-omni doesn't publish a `latest` tag — pull
  failed with "manifest unknown". Pinned VOXTRAL_VLLM_TAG to v0.18.0
  (released 2026-03-29, the day after the Voxtral 4B TTS release —
  first cut with Voxtral support).

* kyutai-tts: NillPointer wrapper exposes ONLY /health (root) and
  POST /v1/audio/speech. No /v1/models, no /v1/audio/voices —
  those return 404. Verified by /openapi.json against the live
  container. Compose healthcheck + playbook wait + verify steps
  all repointed at the actual paths. POST /v1/audio/speech is now
  smoke-tested with a RIFF WAV assertion (same pattern as fish-s2).

* fish-s2: added FISH_S2_MODEL env var so the model variant is
  swappable via .env without rebuilding. Both s2-pro (default) and
  s1-mini are pre-pulled into the bind-mount; LLAMA_CHECKPOINT_PATH
  + DECODER_CHECKPOINT_PATH now use ${FISH_S2_MODEL:-s2-pro}.
  s1-mini was originally gated on fishaudio's HF org (401), but
  niobures/OpenAudio-S1 mirrors the same files openly — pulled
  from there via a one-shot snapshot_download.
2026-04-27 23:54:59 -07:00

107 lines
3.9 KiB
YAML

# Deploy Kyutai TTS (1.6B EN/FR streaming, 220 ms claimed latency) to
# irv-ml1.
#
# Builds the image locally from NillPointer/Kyutai-TTS-Server via
# docker buildx git URL context. ~5-8 min cold build (CUDA + torch +
# moshi + Kyutai's Mimi codec deps). First start downloads
# kyutai/tts-1.6b-en_fr (~3-6 GB) into the bind-mounted HF cache.
#
# Usage:
# scripts/elway irv-ml1 --playbook playbooks/deploy-kyutai-tts.yaml
#
# Note: Kyutai's official deploy is Rust + websockets only. This stack
# uses the NillPointer community wrapper to bridge to OpenAI-compat
# HTTP — adds Python overhead on the request path, so measured TTFB
# will be higher than the bare-Rust 220 ms claim. See README.
#
# Idempotent — every step is creates-/when-gated; rerun is safe.
vars:
compose_dir: /opt/docker/compose/kyutai-tts
voices_dir: /worktank/kyutai-tts/voices
cache_dir: /worktank/kyutai-tts/hf_cache
host_port: "8198"
steps:
# ── host-side dirs ──────────────────────────────────────────────────
- name: Ensure /worktank/kyutai-tts root exists (one-time, sudo)
shell: mkdir -p /worktank/kyutai-tts
sudo: true
creates: /worktank/kyutai-tts
- name: Chown /worktank/kyutai-tts to lkraven
shell: chown -R lkraven:lkraven /worktank/kyutai-tts
sudo: true
when: "[ \"$(stat -c %U /worktank/kyutai-tts)\" != \"lkraven\" ]"
- name: Ensure voices dir exists
shell: mkdir -p {{ voices_dir }}
creates: "{{ voices_dir }}"
- name: Ensure HF cache dir exists
shell: mkdir -p {{ cache_dir }}
creates: "{{ cache_dir }}"
- name: Ensure compose dir exists
shell: mkdir -p {{ compose_dir }}
creates: "{{ compose_dir }}"
# ── deploy compose + env ────────────────────────────────────────────
- name: Upload compose.yaml
upload:
src: stacks/kyutai-tts/compose.yaml
dest: "{{ compose_dir }}/compose.yaml"
mode: "0644"
- name: Seed .env from template (only if absent)
upload:
src: stacks/kyutai-tts/.env.example
dest: "{{ compose_dir }}/.env"
mode: "0644"
when: "[ ! -f {{ compose_dir }}/.env ]"
# ── build + bring up ────────────────────────────────────────────────
- name: docker compose build (~5-8 min first time; cached after)
shell: |
set -o pipefail
cd {{ compose_dir }} && docker compose build 2>&1 \
| grep -vE '^#[0-9]+ |^ => |^=> |Collecting|Downloading|Requirement|Using cached|Installing collected|Successfully (installed|built)|━'
- name: docker compose up -d
shell: cd {{ compose_dir }} && docker compose up -d
- name: Wait for /health to respond (allow ~10 min for first download + warmup)
shell: |
for i in $(seq 1 120); do
curl -sf -o /dev/null --max-time 3 http://localhost:{{ host_port }}/health && exit 0
sleep 5
done
exit 1
changed_when: "false"
verify:
- name: /health returns 200
shell: curl -sf -o /dev/null http://localhost:{{ host_port }}/health
changed_when: "false"
- name: /v1/audio/speech returns a real WAV (POST with text body)
# NillPointer wrapper exposes ONLY /health and POST /v1/audio/speech
# (no /v1/models, no /v1/audio/voices). Smoke by POSTing and
# asserting a RIFF WAV comes back.
shell: |
out=$(mktemp --suffix=.wav)
curl -sf -X POST http://localhost:{{ host_port }}/v1/audio/speech \
-H 'Content-Type: application/json' \
-d '{"model":"tts-1.6b-en_fr","input":"Verify."}' \
-o "$out" --max-time 30
file -b "$out" | grep -q '^RIFF.*WAVE'
rm -f "$out"
changed_when: "false"
- name: Container is running
shell: docker inspect kyutai-tts --format '{{.State.Status}}' | grep -q running
changed_when: "false"