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
+35
View File
@@ -0,0 +1,35 @@
#!/usr/bin/env bash
set -euo pipefail
PROFILE_DIR="${PROFILE_DIR:-/etc/systemd/system/mike-ai-llama-ui.service.d}"
SOURCE_DIR="${SOURCE_DIR:-/opt/mike-ai/platform/profiles}"
SERVICE="${LLAMA_SERVICE:-mike-ai-llama-ui.service}"
PROFILE="${1:-}"
case "$PROFILE" in
fast|medium|long) ;;
large) PROFILE=long ;;
*)
echo "Usage: llama-profile {fast|medium|long|large}" >&2
exit 2
;;
esac
SOURCE="$SOURCE_DIR/profile-$PROFILE.conf"
TARGET="$PROFILE_DIR/override.conf"
if [[ ! -r "$SOURCE" ]]; then
echo "Profildatei fehlt: $SOURCE" >&2
exit 1
fi
install -d -m 0755 "$PROFILE_DIR"
TEMP="$(mktemp "$PROFILE_DIR/.override.conf.XXXXXX")"
trap 'rm -f "$TEMP"' EXIT
install -m 0644 "$SOURCE" "$TEMP"
mv -f "$TEMP" "$TARGET"
trap - EXIT
systemctl daemon-reload
systemctl restart "$SERVICE"
echo "Profil '$PROFILE' wurde aktiviert."