smart_ide/setup/configure-ollama-for-docker.sh
Nicolas Cantu 088eab84b7 Platform docs, services, ia_dev submodule, smart_ide project config
- Add ia_dev submodule (projects/smart_ide on forge 4nk)
- Document APIs, orchestrator, gateway, local-office, rollout
- Add systemd/scripts layout; relocate setup scripts
- Remove obsolete nginx/enso-only docs from this repo scope
2026-04-03 16:07:58 +02:00

23 lines
573 B
Bash
Executable File

#!/bin/bash
# Expose Ollama on all interfaces so Docker containers (AnythingLLM) can reach it via
# host.docker.internal (--add-host=host.docker.internal:host-gateway).
# Requires sudo. Idempotent.
set -euo pipefail
if [ "$(id -u)" -ne 0 ]; then
echo "Run: sudo $0" >&2
exit 1
fi
mkdir -p /etc/systemd/system/ollama.service.d
cat <<'EOF' > /etc/systemd/system/ollama.service.d/override.conf
[Service]
Environment="OLLAMA_HOST=0.0.0.0:11434"
EOF
systemctl daemon-reload
systemctl restart ollama
echo "Ollama listens on 0.0.0.0:11434 (check: ss -tlnp | grep 11434)"