tts-dgx-spark-faster-qwen3-tts/docker/docker-compose.yml
mARTin-B78 08be676685 fix: streaming service uses :latest image (fixes voice drift on port 8023)
The :streaming tag was the pre-v5 image with non_streaming_mode=False,
causing the same voice drift bug as voiceclone had before v5. The streaming
service runs identical code (run_server.py -> openai_server.py) so it uses
:latest which has the non_streaming_mode=True fix. The QWEN_TTS_* env vars
were unused since the command overrides them; removed for clarity.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-30 21:04:00 +02:00

157 lines
5.1 KiB
YAML

# ─────────────────────────────────────────────────────────────────────────────
# Qwen3-TTS GPU Stack
#
# Ports:
# 8020 -> Voice clone, OpenAI-compatible /v1/audio/speech
# 8021 -> VoiceDesign model for prompt-designed voices
# 8022 -> CustomVoice model
# 8023 -> Low-latency streaming voice clone endpoint
#
# Before starting: adjust the volume paths below to match your setup.
# - /path/to/Qwen3-TTS-12Hz-1.7B-Base -> local Qwen3-TTS base model
# - /path/to/Qwen3-TTS-12Hz-1.7B-VoiceDesign -> local VoiceDesign model
# - /path/to/Qwen3-TTS-12Hz-1.7B-CustomVoice -> local CustomVoice model
# - /path/to/faster-qwen3-tts/config -> this repo's config directory
# - /path/to/active_voices -> directory with reference .wav files
#
# Portainer note:
# Set HF_TOKEN in the stack environment if the models ever need Hugging Face access.
# ─────────────────────────────────────────────────────────────────────────────
services:
# Standard voice cloning backend used by TTS Voice Creator and other OpenAI-compatible clients.
faster-qwen3-tts-voiceclone:
image: martinb78/faster-qwen3-tts-dgx-spark:latest
container_name: faster-qwen3-tts-voiceclone
restart: unless-stopped
runtime: nvidia
environment:
- NVIDIA_VISIBLE_DEVICES=all
- HF_TOKEN=${HF_TOKEN}
ports:
- "8020:8000"
volumes:
- /path/to/Qwen3-TTS-12Hz-1.7B-Base:/models/Qwen3-TTS:ro
- /path/to/faster-qwen3-tts/config:/config:rw
- /path/to/active_voices:/voices:ro
command: >
/bin/bash -c "
python3 /config/generate_voices.py &&
python3 /config/run_server.py
--model /models/Qwen3-TTS
--voices /config/voices.json
--port 8000
--max-seq-len 2048
"
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
networks:
- dgx_net
# VoiceDesign backend: creates speech from a descriptive voice prompt instead of a reference clip.
faster-qwen3-tts-voicedesign:
image: martinb78/faster-qwen3-tts-dgx-spark:latest
container_name: faster-qwen3-tts-voicedesign
restart: unless-stopped
runtime: nvidia
environment:
- NVIDIA_VISIBLE_DEVICES=all
- HF_TOKEN=${HF_TOKEN}
ports:
- "8021:8000"
volumes:
- /path/to/Qwen3-TTS-12Hz-1.7B-VoiceDesign:/models/Qwen3-TTS-VoiceDesign:ro
- /path/to/faster-qwen3-tts/config:/config:rw
command: >
/bin/bash -c "
python3 /config/run_voicedesign_server.py
--model /models/Qwen3-TTS-VoiceDesign
--voices /config/voicedesign_voices.json
--port 8000
--max-seq-len 2048
"
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
networks:
- dgx_net
# CustomVoice backend: keeps the separate CustomVoice model available on port 8022.
faster-qwen3-tts-customvoice:
image: martinb78/faster-qwen3-tts-dgx-spark:latest
container_name: faster-qwen3-tts-customvoice
restart: unless-stopped
runtime: nvidia
environment:
- NVIDIA_VISIBLE_DEVICES=all
- HF_TOKEN=${HF_TOKEN}
ports:
- "8022:8000"
volumes:
- /path/to/Qwen3-TTS-12Hz-1.7B-CustomVoice:/models/Qwen3-TTS-CustomVoice:ro
- /path/to/faster-qwen3-tts/config:/config:rw
command: >
/bin/bash -c "
python3 /config/run_customvoice_server.py
--model /models/Qwen3-TTS-CustomVoice
--voices /config/customvoice_voices.json
--port 8000
--max-seq-len 2048
"
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
networks:
- dgx_net
# Streaming voice clone backend: same active voices as 8020, but streams WAV chunks while generating.
faster-qwen3-tts-streaming:
image: martinb78/faster-qwen3-tts-dgx-spark:latest
container_name: faster-qwen3-tts-streaming
restart: unless-stopped
runtime: nvidia
environment:
- NVIDIA_VISIBLE_DEVICES=all
- HF_TOKEN=${HF_TOKEN}
ports:
- "8023:8000"
volumes:
- /path/to/Qwen3-TTS-12Hz-1.7B-Base:/models/Qwen3-TTS:ro
- /path/to/faster-qwen3-tts/config:/config:rw
- /path/to/active_voices:/voices:ro
command: >
/bin/bash -c "
python3 /config/generate_voices.py &&
python3 /config/run_server.py
--model /models/Qwen3-TTS
--voices /config/voices.json
--port 8000
--max-seq-len 4096
"
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
networks:
- dgx_net
networks:
dgx_net:
external: true