-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
101 lines (98 loc) · 3.41 KB
/
Copy pathdocker-compose.yml
File metadata and controls
101 lines (98 loc) · 3.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# protoVoice — one-command deploy
#
# docker compose up -d
#
# Services:
# - protovoice (GPU 0) WebRTC UI + Whisper + Kokoro + routing vLLM
# - fish-speech (GPU 1) Fish Audio S2-Pro TTS sidecar — default backend
# - fish-openai-shim OpenAI /v1/audio/speech ↔ Fish /v1/tts proxy on :8093
# (no GPU — pure HTTP + ffmpeg; talks to fish-speech)
#
# Use `TTS_BACKEND=kokoro docker compose up protovoice` to run without Fish.
services:
fish-speech:
# Built from ~/dev/fish-speech checkout — has the .venv + checkpoints.
build:
context: ../fish-speech
dockerfile: ${PWD}/Dockerfile.fish
container_name: protovoice-fish
restart: unless-stopped
runtime: nvidia
ports:
- "${FISH_PORT:-8092}:8092"
volumes:
- ${FISH_REFERENCES_DIR:-/mnt/data/fish-references}:/app/references
# The Fish Dockerfile COPYs everything, but .dockerignore excludes
# .venv/ and the checkpoints (too large) don't belong baked into the
# image. Bind-mount both from the sibling ../fish-speech checkout that
# the `build.context` above already targets.
- ${FISH_SPEECH_DIR:-../fish-speech}/.venv:/app/.venv:ro
- ${FISH_SPEECH_DIR:-../fish-speech}/checkpoints:/app/checkpoints:ro
environment:
- NVIDIA_VISIBLE_DEVICES=${FISH_GPU:-1}
deploy:
resources:
reservations:
devices:
- driver: nvidia
device_ids: ["${FISH_GPU:-1}"]
capabilities: [gpu]
healthcheck:
test: ["CMD", "python3", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8092/v1/health')"]
interval: 30s
timeout: 10s
start_period: 600s # torch.compile warmup can take ~3-5 min from cold
retries: 5
fish-openai-shim:
build:
context: ./services/fish-openai-shim
container_name: protovoice-fish-shim
restart: unless-stopped
depends_on:
fish-speech:
condition: service_started
ports:
- "${FISH_SHIM_PORT:-8093}:8093"
environment:
- FISH_URL=http://fish-speech:8092
- FISH_SAMPLE_RATE=44100
protovoice:
build: .
container_name: protovoice
restart: unless-stopped
runtime: nvidia
depends_on:
# Only required when TTS_BACKEND=fish (the default).
fish-speech:
condition: service_started
ports:
- "${PORT:-7866}:7866"
volumes:
- ${HF_HOME:-/mnt/models/huggingface}:/models
# env_file picks up secrets like WORKSTACEAN_API_KEY / AVA_API_KEY that
# aren't enumerated below — don't require a compose edit for every new
# delegate key.
env_file:
- path: .env
required: false
environment:
- NVIDIA_VISIBLE_DEVICES=${PROTOVOICE_GPU:-0}
- HF_HOME=/models
- PORT=7866
- VLLM_PORT=8100
- LLM_MODEL=${LLM_MODEL:-Qwen/Qwen3.5-4B}
- WHISPER_MODEL=${WHISPER_MODEL:-openai/whisper-large-v3-turbo}
- TTS_BACKEND=${TTS_BACKEND:-fish}
- FISH_URL=${FISH_URL:-http://fish-speech:8092}
- FISH_REFERENCE_ID=${FISH_REFERENCE_ID:-}
- KOKORO_VOICE=${KOKORO_VOICE:-af_heart}
- SYSTEM_PROMPT=${SYSTEM_PROMPT:-}
- START_VLLM=${START_VLLM:-1}
- LLM_URL=${LLM_URL:-}
deploy:
resources:
reservations:
devices:
- driver: nvidia
device_ids: ["${PROTOVOICE_GPU:-0}"]
capabilities: [gpu]