Lokale KI-Station fuer Zorin OS: Bash-Installer + Docker Compose (Ollama 0.30.7, Open WebUI 0.9.6, n8n 2.25.7), drei roemische Berater als Ollama-Modelfiles, Theme via gsettings, Desktop-Shortcuts. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
66 lines
2.3 KiB
Bash
Executable file
66 lines
2.3 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
#
|
|
# Roman Station — Installer für Zorin OS
|
|
# Eine lokale KI-Station mit römischen Beratern, läuft komplett auf deinem Rechner.
|
|
#
|
|
# Installation (eine Zeile, als normaler Benutzer):
|
|
# curl -sL https://poised-mayfly.pikapod.net/cemsadmin/roman-station/raw/branch/main/install.sh | bash
|
|
#
|
|
set -euo pipefail
|
|
|
|
REPO_URL="${ROMAN_REPO_URL:-https://poised-mayfly.pikapod.net/cemsadmin/roman-station.git}"
|
|
INSTALL_DIR="${ROMAN_STATION_DIR:-$HOME/.roman-station}"
|
|
LOG_FILE="$HOME/roman-station-install.log"
|
|
|
|
log() { printf '\033[1;33m[ROMAN]\033[0m %s\n' "$*" | tee -a "$LOG_FILE"; }
|
|
fail() { printf '\033[1;31m[FEHLER]\033[0m %s\n' "$*" | tee -a "$LOG_FILE"; exit 1; }
|
|
|
|
[ "$(id -u)" -eq 0 ] && fail "Bitte nicht als root starten — das Script nutzt sudo selbst, wo nötig."
|
|
|
|
# --- Bootstrap: bei `curl | bash` liegt noch kein Repo vor → erst klonen, dann von dort weiterlaufen
|
|
SCRIPT_SOURCE="${BASH_SOURCE[0]:-}"
|
|
SCRIPT_DIR=""
|
|
if [ -n "$SCRIPT_SOURCE" ]; then
|
|
SCRIPT_DIR="$(cd "$(dirname "$SCRIPT_SOURCE")" && pwd)"
|
|
fi
|
|
if [ -z "$SCRIPT_DIR" ] || [ ! -f "$SCRIPT_DIR/scripts/preflight.sh" ]; then
|
|
log "Hole Roman Station nach $INSTALL_DIR ..."
|
|
if ! command -v git >/dev/null 2>&1; then
|
|
sudo apt-get update -qq
|
|
sudo apt-get install -y git
|
|
fi
|
|
if [ -d "$INSTALL_DIR/.git" ]; then
|
|
git -C "$INSTALL_DIR" pull --ff-only
|
|
else
|
|
git clone --depth 1 "$REPO_URL" "$INSTALL_DIR"
|
|
fi
|
|
exec bash "$INSTALL_DIR/install.sh"
|
|
fi
|
|
|
|
cd "$SCRIPT_DIR"
|
|
log "Starte Installation aus $SCRIPT_DIR (Protokoll: $LOG_FILE)"
|
|
|
|
[ -f .env ] || cp .env.example .env
|
|
|
|
bash scripts/preflight.sh
|
|
bash scripts/install-docker.sh
|
|
|
|
log "Starte den KI-Motor (Docker Compose) ..."
|
|
sudo docker compose up -d
|
|
|
|
bash scripts/setup-agents.sh
|
|
bash scripts/apply-theme.sh
|
|
bash scripts/create-shortcuts.sh
|
|
|
|
# shellcheck disable=SC1091
|
|
. ./.env
|
|
|
|
log "──────────────────────────────────────────────"
|
|
log "AVE! Deine Roman Station steht."
|
|
log ""
|
|
log " Forum (Chat): http://localhost:${WEBUI_PORT:-3000}"
|
|
log " Werkstatt (n8n): http://localhost:${N8N_PORT:-5678}"
|
|
log ""
|
|
log "Deine Berater: seneca (Mentor), cicero (Texter), marcus (Stratege)"
|
|
log "Auf dem Schreibtisch liegen Verknüpfungen bereit."
|
|
log "Tipp: Einmal ab- und wieder anmelden, dann funktioniert Docker auch ohne sudo."
|