TTS-Slots (Piper CPU, Qwen3-TTS auf Ada), M4000 außer Betrieb, Engine-Grenzen im Placement (ADR-0006)
ci / test (push) Successful in 24s
ci / test (push) Successful in 24s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -7,3 +7,6 @@ MAX_LORA_RANK=64
|
||||
MODELS_DIR=/srv/models
|
||||
ADAPTERS_DIR=/srv/adapters
|
||||
HF_TOKEN=
|
||||
# nur gpu-flex mit Profil "tts": GPU_MEM_UTIL für vLLM dann auf ~0.55 senken, damit Qwen3-TTS Platz hat
|
||||
QWEN_TTS_IMAGE=
|
||||
QWEN_TTS_MODEL=Qwen/Qwen3-TTS-12Hz-1.7B-CustomVoice
|
||||
|
||||
@@ -36,6 +36,24 @@ services:
|
||||
retries: 3
|
||||
start_period: 300s # Laden großer Modelle
|
||||
|
||||
# Qwen3-TTS (ADR-0006) – nur auf gpu-flex, Profil "tts". Server muss OpenAI-kompatibles
|
||||
# /v1/audio/speech anbieten (z. B. ein Wrapper um faster-qwen3-tts); Image-Wahl beim Deployment.
|
||||
qwen-tts:
|
||||
image: ${QWEN_TTS_IMAGE:-knaster/qwen-tts:unset}
|
||||
container_name: qwen-tts
|
||||
profiles: ["tts"]
|
||||
restart: unless-stopped
|
||||
labels: {autoheal: "true"}
|
||||
environment:
|
||||
TTS_MODEL: ${QWEN_TTS_MODEL:-Qwen/Qwen3-TTS-12Hz-1.7B-CustomVoice}
|
||||
volumes:
|
||||
- ${MODELS_DIR:-/srv/models}:/root/.cache/huggingface
|
||||
ports: ["8091:8091"]
|
||||
deploy:
|
||||
resources:
|
||||
reservations:
|
||||
devices: [{driver: nvidia, count: 1, capabilities: [gpu]}]
|
||||
|
||||
gpu-exporter:
|
||||
image: utkuozdemir/nvidia_gpu_exporter:1.2.1
|
||||
restart: unless-stopped
|
||||
|
||||
@@ -37,6 +37,20 @@ services:
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
|
||||
tts-piper:
|
||||
<<: *restart
|
||||
build:
|
||||
context: ../../..
|
||||
dockerfile: deploy/docker/tts-piper.Dockerfile
|
||||
image: knaster/tts-piper:${KNASTER_VERSION:-dev}
|
||||
container_name: tts-piper
|
||||
environment:
|
||||
KNASTER_TTS_PARALLEL: ${TTS_PARALLEL:-2} # i7 mit 4 Kernen: max. 2 parallele Synthesen
|
||||
ports: ["8090:8090"]
|
||||
deploy:
|
||||
resources:
|
||||
limits: {cpus: "2", memory: 1G}
|
||||
|
||||
postgres:
|
||||
<<: *restart
|
||||
image: pgvector/pgvector:pg16
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
# Piper-TTS hinter dem OpenAI-kompatiblen knaster-TTS-Dienst. Build-Kontext: Repo-Wurzel.
|
||||
# Hinweis: piper-tts ab 1.3 ist GPL-3.0 – läuft hier als eigenständiger Dienst.
|
||||
FROM python:3.12-slim
|
||||
|
||||
ARG PIPER_VERSION=1.3.0
|
||||
ARG VOICE_BASE=https://huggingface.co/rhasspy/piper-voices/resolve/main/de/de_DE
|
||||
ENV PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1 PIP_NO_CACHE_DIR=1
|
||||
WORKDIR /app
|
||||
|
||||
RUN apt-get update -qq && apt-get install -y -qq --no-install-recommends curl && rm -rf /var/lib/apt/lists/*
|
||||
RUN pip install "piper-tts==${PIPER_VERSION}"
|
||||
|
||||
COPY core/pyproject.toml core/pyproject.toml
|
||||
COPY core/src core/src
|
||||
RUN pip install ./core
|
||||
|
||||
RUN mkdir -p /voices && cd /voices \
|
||||
&& curl -fsSL -o de_DE-thorsten-medium.onnx "${VOICE_BASE}/thorsten/medium/de_DE-thorsten-medium.onnx" \
|
||||
&& curl -fsSL -o de_DE-thorsten-medium.onnx.json "${VOICE_BASE}/thorsten/medium/de_DE-thorsten-medium.onnx.json"
|
||||
|
||||
ENV KNASTER_TTS_VOICES=thorsten=/voices/de_DE-thorsten-medium.onnx \
|
||||
KNASTER_TTS_CMD="piper -m {model} -f {out}" \
|
||||
KNASTER_TTS_PARALLEL=2
|
||||
|
||||
RUN useradd --system --uid 10002 tts
|
||||
USER tts
|
||||
EXPOSE 8090
|
||||
HEALTHCHECK --interval=30s --timeout=5s --retries=3 \
|
||||
CMD python -c "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8090/health', timeout=4)"
|
||||
CMD ["knaster", "tts-serve", "--host", "0.0.0.0", "--port", "8090"]
|
||||
@@ -58,10 +58,25 @@ model_list:
|
||||
api_key: none
|
||||
model_info: {mode: rerank}
|
||||
|
||||
# --- Sprachausgabe (OpenAI-kompatibles /v1/audio/speech) ---
|
||||
- model_name: tts-de # Piper im Infra-LXC (knaster tts-serve)
|
||||
litellm_params:
|
||||
model: openai/tts-de
|
||||
api_base: http://tts-piper:8090/v1
|
||||
api_key: none
|
||||
model_info: {mode: audio_speech}
|
||||
- model_name: tts-de-hq # Qwen3-TTS auf gpu-flex (Server-Wahl beim Deployment)
|
||||
litellm_params:
|
||||
model: openai/tts-de-hq
|
||||
api_base: http://gpu-flex:8091/v1
|
||||
api_key: none
|
||||
model_info: {mode: audio_speech}
|
||||
|
||||
router_settings:
|
||||
# Infrastruktur-Fallbacks innerhalb einer Stufe; Qualitäts-Eskalation macht der Router-Service
|
||||
fallbacks:
|
||||
- tier1-general: [tier1-flex]
|
||||
- tts-de-hq: [tts-de]
|
||||
allowed_fails: 2
|
||||
cooldown_time: 60
|
||||
num_retries: 1
|
||||
|
||||
Reference in New Issue
Block a user