Funktionierender STand!!!
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
set -euo pipefail
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
HEALTH_URL="http://localhost:8091/health"
|
||||
HEALTH_URL="" # leer → nutzt docker inspect health status
|
||||
MAX_WAIT="${MAX_WAIT:-180}"
|
||||
[ -f .env ] && source .env
|
||||
MODEL="${QWEN3_TTS_CLONE_MODEL:-Qwen/Qwen3-TTS-12Hz-1.7B-Base}"
|
||||
@@ -25,16 +25,22 @@ printf " API http://localhost:8091
|
||||
"
|
||||
|
||||
while (( SECONDS - t0 < MAX_WAIT )); do
|
||||
if curl -sf "$HEALTH_URL" >/dev/null 2>&1; then
|
||||
printf "✓ Clone bereit: http://localhost:8091 [%ds]
|
||||
STATUS=$(docker inspect qwen3-tts-clone --format='{{.State.Health.Status}}' 2>/dev/null || true)
|
||||
if [ "$STATUS" = "healthy" ]; then
|
||||
printf "✓ Clone bereit: ws://localhost:8091 [%ds]
|
||||
" $(( SECONDS - t0 ))
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "$STATUS" = "unhealthy" ]; then
|
||||
printf "✗ Clone-Container unhealthy. Logs:
|
||||
" >&2
|
||||
docker logs --tail=20 qwen3-tts-clone 2>&1 >&2 || true
|
||||
exit 1
|
||||
fi
|
||||
if ! docker ps --filter "name=qwen3-tts-clone" --filter "status=running" -q | grep -q .; then
|
||||
printf "✗ Clone-Container abgestürzt. Logs:
|
||||
" >&2
|
||||
docker logs --tail=40 qwen3-tts-clone 2>&1 >&2 || true
|
||||
docker logs --tail=20 qwen3-tts-clone 2>&1 >&2 || true
|
||||
exit 1
|
||||
fi
|
||||
sleep 2
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
set -e
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
HEALTH_URL="http://localhost:8091/health"
|
||||
HEALTH_URL="" # leer → nutzt docker inspect health status
|
||||
MAX_WAIT=180
|
||||
# .env aus dem Projektroot laden (nur falls Variable nicht schon im Shell-Env gesetzt)
|
||||
[ -f .env ] && source .env
|
||||
@@ -59,13 +59,19 @@ LOG_PID=$!
|
||||
|
||||
# --- Health-Check-Schleife ---
|
||||
while (( SECONDS - t0 < MAX_WAIT )); do
|
||||
if curl -sf "$HEALTH_URL" >/dev/null 2>&1; then
|
||||
STATUS=$(docker inspect qwen3-tts --format='{{.State.Health.Status}}' 2>/dev/null || true)
|
||||
if [ "$STATUS" = "healthy" ]; then
|
||||
kill "$LOG_PID" 2>/dev/null
|
||||
wait "$LOG_PID" 2>/dev/null || true
|
||||
printf "\n✓ Bereit: API http://localhost:8091 UI http://localhost:8092 WS-Log ws://localhost:8094/v1/audio/speech/stream [%ds]\n" $(( SECONDS - t0 ))
|
||||
printf "\n✓ Bereit: API ws://localhost:8091 UI http://localhost:8092 [%ds]\n" $(( SECONDS - t0 ))
|
||||
exit 0
|
||||
fi
|
||||
# Abbruch wenn Container schon gestoppt ist
|
||||
if [ "$STATUS" = "unhealthy" ]; then
|
||||
kill "$LOG_PID" 2>/dev/null
|
||||
printf "\n✗ Container unhealthy. Logs:\n"
|
||||
docker logs --tail=20 qwen3-tts 2>&1 | strip_ansi | grep -E "ERROR|ValueError|Exception" | head -5
|
||||
exit 1
|
||||
fi
|
||||
if ! docker ps --filter "name=qwen3-tts" --filter "status=running" -q | grep -q .; then
|
||||
kill "$LOG_PID" 2>/dev/null
|
||||
printf "\n✗ Container abgestürzt. Logs:\n"
|
||||
|
||||
Reference in New Issue
Block a user