Add reproducible Piper TTS service

This commit is contained in:
Mikei386 committed 2026-08-21 17:02:32 +02:00
1 parent 53dfffc289
commit a5cf11582a
19 files changed
+316 -34

No files matched your search

+25 -16
View File
@@ -25,33 +25,42 @@ else
fail "nvidia-smi fehlt"
fi
for service in mike-ai-llama-ui mike-ai-profile-router; do
if systemctl is-active --quiet "$service"; then
pass "$service aktiv"
container_healthy() {
local name=$1 state health
state="$(docker inspect --format '{{.State.Status}}' "$name" 2>/dev/null || true)"
health="$(docker inspect --format '{{if .State.Health}}{{.State.Health.Status}}{{end}}' "$name" 2>/dev/null || true)"
[[ $state == running && ( -z $health || $health == healthy ) ]]
}
for container in mike-ai-profile-controller mike-ai-router mike-ai-piper mike-ai-open-webui; do
if container_healthy "$container"; then
pass "$container gesund"
else
fail "$service nicht aktiv"
fail "$container fehlt oder ist nicht gesund"
fi
done
for optional in mike-ai-whisper mike-ai-xtts mike-ai-web-search; do
if systemctl is-active --quiet "$optional"; then
ACTIVE_LLAMA="$(docker ps --format '{{.Names}}' | grep -Ec '^mike-ai-llama-(fast|medium|long|experimental)$' || true)"
if [[ $ACTIVE_LLAMA -eq 1 ]]; then
pass "exakt ein llama.cpp-Profil aktiv"
else
fail "$ACTIVE_LLAMA llama.cpp-Profile aktiv (erwartet: 1)"
fi
for optional in mike-ai-mcp-web mike-ai-mcp-homeassistant mike-ai-mcp-arr mike-ai-mcp-unraid-official; do
if container_healthy "$optional"; then
pass "$optional aktiv"
else
warn "$optional nicht aktiv oder nicht installiert"
fi
done
if curl -fsS --max-time 3 http://127.0.0.1:8080/health >/dev/null; then
pass "llama.cpp Health-Check"
if docker exec mike-ai-router python -c \
"import urllib.request; urllib.request.urlopen('http://127.0.0.1:8081/health', timeout=3)" \
>/dev/null 2>&1; then
pass "Router-Liveness intern erreichbar"
else
fail "llama.cpp auf Port 8080 nicht gesund"
fi
if STATUS="$(curl -fsS --max-time 3 http://127.0.0.1:8081/status 2>/dev/null)"; then
PROFILE="$(python3 -c 'import json,sys; print(json.load(sys.stdin).get("current_profile"))' <<<"$STATUS" 2>/dev/null)"
pass "Router erreichbar, Profil ${PROFILE:-unbekannt}"
else
fail "Router auf Port 8081 nicht erreichbar"
fail "Router-Liveness intern nicht erreichbar"
fi
if systemctl list-unit-files --no-legend 2>/dev/null | grep -Eq '(vision-rx|whisper-rx|granite-rx).*enabled'; then