Kleineres Modell
This commit is contained in:
45
docker/entrypoint_clone.sh
Executable file
45
docker/entrypoint_clone.sh
Executable file
@@ -0,0 +1,45 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
MODEL="${QWEN3_TTS_CLONE_MODEL:-}"
|
||||
PORT="${QWEN3_TTS_CLONE_PORT:-8091}"
|
||||
|
||||
if [ -z "$MODEL" ]; then
|
||||
echo "[clone] QWEN3_TTS_CLONE_MODEL ist nicht gesetzt." >&2
|
||||
exit 2
|
||||
fi
|
||||
|
||||
echo "[clone] starte Clone-Modell: ${MODEL} auf Port ${PORT}"
|
||||
|
||||
if [ -f /patch_qwen3_tts_runtime.py ]; then
|
||||
python3 /patch_qwen3_tts_runtime.py
|
||||
fi
|
||||
|
||||
vllm-omni serve "$MODEL" \
|
||||
--omni \
|
||||
--host 0.0.0.0 \
|
||||
--port "$PORT" \
|
||||
--deploy-config /deploy/qwen3_tts_clone.yaml \
|
||||
--trust-remote-code &
|
||||
SERVER_PID=$!
|
||||
|
||||
(
|
||||
for _ in $(seq 1 150); do
|
||||
if curl -sf "http://localhost:${PORT}/health" >/dev/null 2>&1; then
|
||||
echo "[warmup] Clone gesund — sende Warmup-Request (kompiliert CUDA-Graphen)..."
|
||||
t0=$SECONDS
|
||||
curl -sf -X POST "http://localhost:${PORT}/v1/audio/speech" \
|
||||
-H 'Content-Type: application/json' \
|
||||
--max-time 180 \
|
||||
-d "{\"model\":\"${MODEL}\",\"input\":\"System wird aufgewärmt.\",\"language\":\"German\",\"response_format\":\"wav\",\"task_type\":\"VoiceDesign\",\"instructions\":\"Eine ruhige Stimme.\"}" \
|
||||
-o /dev/null \
|
||||
&& echo "[warmup] Clone fertig nach $(( SECONDS - t0 ))s — jetzt heiß." \
|
||||
|| echo "[warmup] fehlgeschlagen (Clone läuft trotzdem)."
|
||||
break
|
||||
fi
|
||||
sleep 2
|
||||
done
|
||||
) &
|
||||
|
||||
trap 'kill "$SERVER_PID" 2>/dev/null || true' TERM INT
|
||||
wait "$SERVER_PID"
|
||||
Reference in New Issue
Block a user