Sesame CSM-1B via phildougherty/sesame_csm_openai — OpenAI-compat /v1/audio/speech, context-aware conversational speech (voice-agent layer, not a plain reader). Port 8201 on irv-ml1. Gated model: requires CSM_HF_TOKEN (license acceptance) — placeholder in .env.example, real token only in host .env.
63 lines
2.7 KiB
YAML
63 lines
2.7 KiB
YAML
# Sesame CSM-1B (Conversational Speech Model) served via
|
|
# phildougherty/sesame_csm_openai — an OpenAI-compat wrapper around
|
|
# Sesame's context-aware speech model (Llama backbone + Mimi codec).
|
|
#
|
|
# Why this stack exists alongside the other TTS:
|
|
# * CSM is a CONVERSATIONAL speech layer, not a plain reader — it
|
|
# conditions on prior turns (text + audio) to pick prosody, built
|
|
# for voice-AGENT turn-taking. As pure TTS it works standalone;
|
|
# its differentiator only pays off in interactive/agent use.
|
|
# * OpenAI-compat /v1/audio/speech with 6 standard voices
|
|
# (alloy/echo/fable/onyx/nova/shimmer) + cloned voice IDs.
|
|
# * ~8 GB VRAM; fits the 3090 (device 0) or A6000 (device 1).
|
|
#
|
|
# NOTE: sesame/csm-1b is a GATED model — you must accept its license at
|
|
# https://huggingface.co/sesame/csm-1b and supply CSM_HF_TOKEN in .env
|
|
# before first boot, or the model download 401s.
|
|
#
|
|
# Image built locally from the upstream wrapper via buildx git-context.
|
|
# All tunables live in .env — edit that, not this file.
|
|
|
|
services:
|
|
csm:
|
|
image: local/csm:${CSM_TAG}
|
|
build:
|
|
context: https://github.com/phildougherty/sesame_csm_openai.git#${CSM_SHA}
|
|
dockerfile: Dockerfile
|
|
container_name: csm
|
|
restart: unless-stopped
|
|
runtime: nvidia
|
|
ports:
|
|
- "${CSM_BIND:-0.0.0.0}:${CSM_PORT}:8000"
|
|
environment:
|
|
- NVIDIA_VISIBLE_DEVICES=${CSM_GPU_DEVICES:-0}
|
|
- NVIDIA_DRIVER_CAPABILITIES=compute,utility
|
|
# Required: gated-model access token (accept the csm-1b license on
|
|
# HF first). Set the real value in .env, NEVER here.
|
|
- HF_TOKEN=${CSM_HF_TOKEN}
|
|
- HF_HUB_ENABLE_HF_TRANSFER=1
|
|
- HF_HOME=/app/hf_cache
|
|
# Optional multi-GPU split: auto | balanced | sequential.
|
|
- CSM_DEVICE_MAP=${CSM_DEVICE_MAP:-}
|
|
volumes:
|
|
- ${CSM_VOICES_DIR}:/app/voices
|
|
- ${CSM_CACHE_DIR}:/app/hf_cache
|
|
healthcheck:
|
|
# The wrapper exposes no /health route; GET /v1/audio/voices
|
|
# returns the voice list only once the model is loaded, so it
|
|
# doubles as liveness + ready. python urllib (no curl in image),
|
|
# bound to 127.0.0.1 (uvicorn is IPv4-only).
|
|
test: ["CMD-SHELL", "python3 -c \"import urllib.request,sys; urllib.request.urlopen('http://127.0.0.1:8000/v1/audio/voices', timeout=5); sys.exit(0)\""]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
# First boot pulls csm-1b + the Llama-3.2-1B tokenizer + Mimi —
|
|
# gated download, generous deadline.
|
|
start_period: 600s
|
|
labels:
|
|
- homepage.group=AI Systems
|
|
- homepage.name=Sesame CSM
|
|
- homepage.icon=mdi-account-voice-outline
|
|
- homepage.description=Conversational speech model — context-aware voice-agent TTS (irv-ml1)
|
|
- homepage.href=http://10.100.79.3:${CSM_PORT}
|