Files
AI-Profile-Router/deploy/deploy.sh
T

26 lines
1.0 KiB
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
# AI Profile Router – Deployment vom Coding-System auf das Zielsystem.
# Überträgt die Deploy-Dateien per SCP und führt install.sh per SSH aus.
set -euo pipefail
cd "$(dirname "$0")/.."
: "${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/router_support.py router/router_profiles.json \
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 \
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'
scp -i "$SSH_KEY" "$STAGE"/* "$TARGET:/tmp/ai-profile-router/"
rm -rf "$STAGE"
echo "== Führe Installation auf dem Zielsystem aus"
ssh -i "$SSH_KEY" "$TARGET" 'bash /tmp/ai-profile-router/install.sh'