Expand router into reproducible local AI platform

This commit is contained in:
Mikei386
2026-08-20 12:56:53 +02:00
parent a84220725a
commit 0e4a9de5ba
34 changed files with 2584 additions and 31 deletions
+4 -3
View File
@@ -4,15 +4,16 @@
set -euo pipefail
cd "$(dirname "$0")/.."
TARGET="${TARGET:-root@192.168.1.196}"
SSH_KEY="${SSH_KEY:-$HOME/.ssh/lmstudio_unraid}"
: "${TARGET:?TARGET muss gesetzt sein, z. B. root@ai-host}"
SSH_KEY="${SSH_KEY:-$HOME/.ssh/id_ed25519}"
STAGE="/tmp/ai-profile-router-$$"
mkdir -p "$STAGE"
cp router/ai_profile_router.py router/image_worker.py router/xtts_worker.py \
router/stt_worker.py \
deploy/install.sh deploy/mike-ai-profile-router.service \
deploy/mike-ai-xtts.service deploy/mike-ai-whisper.service "$STAGE/"
deploy/mike-ai-xtts.service deploy/mike-ai-whisper.service \
deploy/requirements-image.lock deploy/requirements-xtts.lock "$STAGE/"
echo "== Übertrage Dateien nach ${TARGET}:/tmp/ai-profile-router/"
ssh -i "$SSH_KEY" "$TARGET" 'mkdir -p /tmp/ai-profile-router'
+6 -10
View File
@@ -51,13 +51,11 @@ if [ ! -x "$VENV/bin/python" ]; then
echo "-- Erstelle Python-Venv in $VENV"
python3 -m venv "$VENV"
fi
echo "-- Installiere/aktualisiere Bild-Abhängigkeiten (torch, diffusers, ...)"
echo "-- Installiere festgeschriebene Bild-Abhängigkeiten"
"$VENV/bin/pip" install --quiet --upgrade pip
"$VENV/bin/pip" install --quiet \
torch \
diffusers \
transformers \
accelerate
"$VENV/bin/pip" install --quiet torch==2.11.0+cu128 \
--index-url https://download.pytorch.org/whl/cu128
"$VENV/bin/pip" install --quiet -r "$DIR/requirements-image.lock"
# --- 4. FLUX-Modell (nur wenn noch nicht vorhanden) --------------------------
if [ -f "$MODEL_DIR/model_index.json" ]; then
@@ -89,12 +87,10 @@ if [ ! -x "$XTTS_VENV/bin/python" ]; then
uv venv --python 3.11 "$XTTS_VENV"
"$XTTS_VENV/bin/pip" install --quiet --upgrade pip
echo "-- Installiere CPU-only torch"
"$XTTS_VENV/bin/pip" install --quiet torch torchaudio \
"$XTTS_VENV/bin/pip" install --quiet torch==2.11.0+cpu torchaudio==2.11.0+cpu \
--index-url https://download.pytorch.org/whl/cpu
echo "-- Installiere Coqui TTS + Abhängigkeiten"
"$XTTS_VENV/bin/pip" install --quiet \
TTS==0.22.0 transformers==4.40.2 tokenizers==0.19.1 \
huggingface-hub==0.36.2 librosa soundfile
"$XTTS_VENV/bin/pip" install --quiet -r "$DIR/requirements-xtts.lock"
# PyTorch 2.6+ weights_only-Patch für Coqui TTS
echo "-- Wende weights_only-Patch für Coqui TTS an"
"$XTTS_VENV/bin/python" - <<'PY'
+1 -1
View File
@@ -22,7 +22,7 @@ Environment=IMAGE_DIR=/opt/mike-ai/ai-profile-router/images
Environment=IMAGE_WORKER_LOG=/opt/mike-ai/ai-profile-router/worker.log
Environment=IMAGE_GEN_TIMEOUT=600
Environment=IMAGE_VRAM_FREE_TIMEOUT=120
Environment=LLAMA_SERVER_BIN=/opt/mike-ai/llama.cpp-nvfp4/build/bin/llama-server
Environment=LLAMA_SERVER_BIN=/opt/mike-ai/llama.cpp/build/bin/llama-server
Environment=VISION_MODEL=/opt/mike-ai/models/qwen3.8-27b/Qwen3.8-27B-Q3_K_M.gguf
Environment=VISION_MMPROJ=/opt/mike-ai/models/qwen3.8-27b-nvfp4/mmproj-BF16.gguf
Environment=VISION_CTX=32768
+6
View File
@@ -0,0 +1,6 @@
diffusers @ git+https://github.com/huggingface/diffusers.git@11a82a15fe473ed974ff35111dd629b05fb1b3ed
transformers==5.15.0
accelerate==1.14.0
huggingface-hub==1.28.0
safetensors==0.8.0
Pillow==12.3.0
+6
View File
@@ -0,0 +1,6 @@
TTS==0.22.0
transformers==4.40.2
tokenizers==0.19.1
huggingface-hub==0.36.2
librosa==0.11.0
soundfile==0.14.0