commit e8209367271f63f40402c7dfabea2499cc46d9fd Author: Travis Herbranson Date: Fri May 22 15:59:45 2026 -0400 init commit to create the project diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f85fff7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.env +*.env.local diff --git a/README.md b/README.md new file mode 100644 index 0000000..9717fcd --- /dev/null +++ b/README.md @@ -0,0 +1,26 @@ +# ollama + +Local LLM + embedding runtime for the homelab. CPU-only deployment on +herbydev (no GPU). Reachable as `ollama:11434` from containers on the +shared `homelab` Docker network. Loopback `127.0.0.1:11434` on the host. + +## Pulled models + +| Model | Purpose | Pulled | Notes | +|-------|---------|--------|-------| +| `nomic-embed-text` | OB1 embedding model | 2026-05-14 | 768-dim, ~137MB; replaced OpenRouter `text-embedding-3-small` (1536-d) | + +## Usage + +```bash +docker compose -f compose.yml up -d +docker exec ollama ollama list # pulled models +docker exec ollama ollama pull # add a model +curl -s http://127.0.0.1:11434/api/embeddings \ + -d '{"model":"nomic-embed-text","prompt":"hello world"}' | jq '.embedding | length' +``` + +## Consumers + +- **ob1-mcp** — embeddings + metadata extraction. Reaches Ollama as + `http://ollama:11434` via the `homelab` network. diff --git a/compose.yml b/compose.yml new file mode 100644 index 0000000..73e3a3b --- /dev/null +++ b/compose.yml @@ -0,0 +1,38 @@ +# ollama — local LLM/embedding runtime for the homelab. +# +# CPU-only deployment on herbydev. No GPU runtime (no `runtime: nvidia`, +# no `devices:` block). Reachable as `ollama:11434` from any container +# on the shared `homelab` network. Loopback-only on the host (no public +# exposure, no cloudflared route, no Tailscale binding). +# +# Models persist in the named `ollama-models` volume across restarts. +# +# Usage: +# docker compose -f compose.yml up -d +# docker exec ollama ollama pull +# docker exec ollama ollama list + +name: ollama + +services: + ollama: + image: ollama/ollama:latest + container_name: ollama + restart: unless-stopped + environment: + - OLLAMA_KEEP_ALIVE=${OLLAMA_KEEP_ALIVE} + - OLLAMA_NUM_PARALLEL=${OLLAMA_NUM_PARALLEL} + ports: + - "127.0.0.1:11434:11434" # loopback on host; in-network via Docker DNS + volumes: + - ollama-models:/root/.ollama + networks: + - homelab + # No runtime/devices/gpus — CPU only by design. + +volumes: + ollama-models: + +networks: + homelab: + external: true