#!/bin/bash set -e # Start Ollama in background ollama serve & OLLAMA_PID=$! # Wait for Ollama to be ready echo "[SnapKitty] Waiting for Ollama..." until curl -sf http://localhost:11434/api/tags > /dev/null 2>&1; do sleep 1 done echo "[SnapKitty] Ollama ready." # Pull model if not cached echo "[SnapKitty] Checking model ${OLLAMA_MODEL}..." ollama pull "${OLLAMA_MODEL}" || echo "[SnapKitty] Model pull failed — using HF fallback" echo "[SnapKitty] Starting sovereign chat harness..." echo "[SnapKitty] Every response will be WORM-sealed." echo "[SnapKitty] http://localhost:${PORT}" python app.py # Cleanup kill $OLLAMA_PID 2>/dev/null || true