107 lines
3.4 KiB
YAML
107 lines
3.4 KiB
YAML
|
|
services:
|
||
|
|
|
||
|
|
# ── LiveKit signalling server ──────────────────────────────────────────────
|
||
|
|
livekit:
|
||
|
|
image: livekit/livekit-server:latest
|
||
|
|
ports:
|
||
|
|
- "7880:7880"
|
||
|
|
- "7881:7881"
|
||
|
|
- "7882:7882/udp"
|
||
|
|
command: --dev --bind 0.0.0.0
|
||
|
|
environment:
|
||
|
|
- "LIVEKIT_KEYS=devkey: secret"
|
||
|
|
|
||
|
|
# ── Ollama (LLM) ──────────────────────────────────────────────────────────
|
||
|
|
ollama:
|
||
|
|
image: ollama/ollama:latest
|
||
|
|
ports:
|
||
|
|
- "11434:11434"
|
||
|
|
volumes:
|
||
|
|
- ollama_data:/root/.ollama
|
||
|
|
# Pull model on startup if not already present
|
||
|
|
entrypoint: >
|
||
|
|
sh -c "ollama serve &
|
||
|
|
sleep 5 &&
|
||
|
|
ollama pull ${DEFAULT_MODEL:-hf.co/mradermacher/Heretic-Dolphin3.0-Qwen2.5-3b-i1-GGUF:Q4_K_M} &&
|
||
|
|
tail -f /dev/null"
|
||
|
|
healthcheck:
|
||
|
|
test: ["CMD", "ollama", "list"]
|
||
|
|
interval: 10s
|
||
|
|
timeout: 5s
|
||
|
|
retries: 20
|
||
|
|
start_period: 30s
|
||
|
|
|
||
|
|
# ── Whisper STT server ────────────────────────────────────────────────────
|
||
|
|
whisper:
|
||
|
|
image: fedirz/faster-whisper-server:0.6.0-rc.3-cpu
|
||
|
|
ports:
|
||
|
|
- "8778:8000"
|
||
|
|
environment:
|
||
|
|
- WHISPER__MODEL=${WHISPER_MODEL:-base}
|
||
|
|
healthcheck:
|
||
|
|
test: ["CMD-SHELL", "python3 -c \"import urllib.request; urllib.request.urlopen('http://localhost:8000/health')\""]
|
||
|
|
interval: 10s
|
||
|
|
timeout: 5s
|
||
|
|
retries: 10
|
||
|
|
start_period: 30s
|
||
|
|
|
||
|
|
# ── Kokoro TTS (OpenAI-compat, CPU) ───────────────────────────────────────
|
||
|
|
kokoro:
|
||
|
|
image: ghcr.io/remsky/kokoro-fastapi-cpu:v0.8.1
|
||
|
|
ports:
|
||
|
|
- "8880:8880"
|
||
|
|
environment:
|
||
|
|
- DOWNLOAD_MODEL=true
|
||
|
|
volumes:
|
||
|
|
- kokoro_models:/app/api/src/models
|
||
|
|
healthcheck:
|
||
|
|
test: ["CMD", "curl", "-f", "http://localhost:8880/health"]
|
||
|
|
interval: 10s
|
||
|
|
timeout: 5s
|
||
|
|
retries: 10
|
||
|
|
start_period: 30s
|
||
|
|
|
||
|
|
# ── Token server + browser UI ─────────────────────────────────────────────
|
||
|
|
ui:
|
||
|
|
build:
|
||
|
|
context: .
|
||
|
|
dockerfile: Dockerfile
|
||
|
|
ports:
|
||
|
|
- "7731:7731"
|
||
|
|
env_file: .env
|
||
|
|
environment:
|
||
|
|
- OLLAMA_BASE_URL=http://ollama:11434/v1
|
||
|
|
depends_on:
|
||
|
|
livekit:
|
||
|
|
condition: service_started
|
||
|
|
ollama:
|
||
|
|
condition: service_healthy
|
||
|
|
|
||
|
|
# ── Voice agent ───────────────────────────────────────────────────────────
|
||
|
|
agent:
|
||
|
|
build:
|
||
|
|
context: .
|
||
|
|
dockerfile: Dockerfile.agent
|
||
|
|
env_file: .env
|
||
|
|
environment:
|
||
|
|
- LIVEKIT_URL=ws://livekit:7880
|
||
|
|
- LIVEKIT_API_KEY=devkey
|
||
|
|
- LIVEKIT_API_SECRET=secret
|
||
|
|
- OLLAMA_BASE_URL=http://ollama:11434/v1
|
||
|
|
- TTS_BACKEND=kokoro
|
||
|
|
- KOKORO_BASE_URL=http://kokoro:8880/v1
|
||
|
|
- WHISPER_BASE_URL=http://whisper:8000/v1
|
||
|
|
depends_on:
|
||
|
|
livekit:
|
||
|
|
condition: service_started
|
||
|
|
ollama:
|
||
|
|
condition: service_healthy
|
||
|
|
kokoro:
|
||
|
|
condition: service_healthy
|
||
|
|
whisper:
|
||
|
|
condition: service_healthy
|
||
|
|
|
||
|
|
volumes:
|
||
|
|
ollama_data:
|
||
|
|
kokoro_models:
|