init commit to create the project
This commit is contained in:
commit
e820936727
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
.env
|
||||
*.env.local
|
||||
26
README.md
Normal file
26
README.md
Normal file
@ -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 <model> # 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.
|
||||
38
compose.yml
Normal file
38
compose.yml
Normal file
@ -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 <model>
|
||||
# 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
|
||||
Loading…
Reference in New Issue
Block a user