Initial upload
This commit is contained in:
32
recipes/ai/memory/deploy.sh
Normal file
32
recipes/ai/memory/deploy.sh
Normal file
@@ -0,0 +1,32 @@
|
||||
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
ensure_root
|
||||
detect_pkg_manager
|
||||
install_docker
|
||||
|
||||
if ask_to_install "RAG Memory Stack (Qdrant + Memory API)"; then
|
||||
log "=== RAG Memory Stack Installation ==="
|
||||
|
||||
read -rp "Ollama API URL (z.B. http://127.0.0.1:11434): " OLLAMA_API_URL
|
||||
OLLAMA_API_URL=${OLLAMA_API_URL:-http://127.0.0.1:11434}
|
||||
|
||||
BASE="/srv/docker/services/memory"
|
||||
$SUDO mkdir -p "$BASE/qdrant"
|
||||
$SUDO cp -r "$(dirname "${BASH_SOURCE[0]}")/memory-api" "$BASE/"
|
||||
$SUDO cp "$(dirname "${BASH_SOURCE[0]}")/compose.yaml" "$BASE/docker-compose.yml"
|
||||
cd "$BASE"
|
||||
|
||||
$SUDO sed -i "s|{{OLLAMA_API}}|$OLLAMA_API_URL|g" docker-compose.yml
|
||||
|
||||
log "🚀 Starte RAG Memory Stack..."
|
||||
$SUDO docker compose up -d --build
|
||||
|
||||
log "Attempting to pull embedding model from remote Ollama..."
|
||||
$SUDO curl -s -X POST "$OLLAMA_API_URL/api/pull" -H 'Content-Type: application/json' -d '{"name": "nomic-embed-text"}' || log "Notice: Model pull failed (possibly using a gateway). Continuing."
|
||||
|
||||
log "✅ RAG Memory Stack läuft unter: http://<server-ip>:8085"
|
||||
else
|
||||
log "${YELLOW}⏭ RAG Memory Stack übersprungen.${NC}"
|
||||
fi
|
||||
Reference in New Issue
Block a user