fix(infra): make ollama model pull non-fatal in setup.sh

ollama pull piped through tail with set -euo pipefail would abort the
entire 8-phase setup on a slow network or wrong model name. Only
LocalMemGPT needs the model — the other 9 products are unaffected.
This commit is contained in:
saravanakumardb1 2026-03-24 12:20:13 -07:00
parent a3f4c6facf
commit b634708da8

View File

@ -206,10 +206,14 @@ DJSON
log "Waiting for Ollama API..."
wait_for_url "http://localhost:11434/api/version" 30
# Pull default model
# Pull default model (non-fatal — LocalMemGPT needs it but other products don't)
log "Pulling Ollama model: ${OLLAMA_MODEL} (this may take a few minutes)..."
ollama pull "$OLLAMA_MODEL" 2>&1 | tail -3
ok "Ollama ready with model: ${OLLAMA_MODEL}"
if ollama pull "$OLLAMA_MODEL" 2>&1 | tail -3; then
ok "Ollama ready with model: ${OLLAMA_MODEL}"
else
warn "Ollama model pull failed (network issue?). LocalMemGPT may not work."
warn " Retry later: ollama pull ${OLLAMA_MODEL}"
fi
# ── Create install directory ───────────────────────────────────────
mkdir -p "$INSTALL_DIR"