homelab-codex-ws/services/ollama/docker-compose.yml

26 lines
1,015 B
YAML
Raw Permalink Normal View History

2026-05-11 20:46:50 +02:00
services:
ollama:
image: ollama/ollama:latest
container_name: ollama
restart: unless-stopped
ports:
# Loopback: service.yaml's healthcheck + healthcheck.sh curl localhost
# directly on the node. Tailscale IP: llm-gateway@PIHA reaches this over
# the mesh as http://solaria:11434 (MagicDNS). No 0.0.0.0 — this is a
# private service, don't expose wider than local + internal network.
# Requires .env (from env.example) next to this file at deploy.
- "127.0.0.1:11434:11434"
- "${TAILSCALE_BIND_IP}:11434:11434"
2026-05-11 20:46:50 +02:00
volumes:
- /opt/homelab/data/ollama:/root/.ollama
fix(ollama): restore GPU reservation on SOLARIA, close 07-15 cutover docs Driver fixed 2026-07-16 (nvidia-driver-595-open from distro repo, old graphics-drivers PPA for jammy disabled) — RTX 4070 Ti SUPER 16GB, CUDA 13.2, nvidia-container-toolkit already present from the 07-15 cutover prerequisite install. Uncomments deploy.resources.reservations (nvidia gpu) in services/ollama/docker-compose.yml, restoring clean formatting. Docs close out the loose ends from the 07-15 declarative cutover: - ollama-solaria-cutover runbook gets a "Wykonanie" section documenting what actually happened (mv instead of rsync for the model store, the missing nvidia-container-toolkit prerequisite, the driver-missing discovery, CPU-only cutover, then the 07-16 GPU fix) plus a note on the container disappearing after the 07-15 evening reboot (one-off, boots fine now, root cause not established). - hosts/solaria/services.yaml: ollama role comment now reflects actual GPU-backed state instead of the previously-aspirational wording. - hosts/solaria/README.md: drop stale Open WebUI mention (not in repo). - docs/backlog.md: close the NVIDIA driver item; leave two follow-ups (Ollama call batching before the mail phase, UNIQUE(envelope_id, chunk_index) schema change for multi-model embeddings at phase 3). - jobs/documents-ingest/README.md: timing section gets a GPU placeholder line next to the existing 0.79s/chunk CPU baseline, to be filled in after the live GPU benchmark. Live recreate + GPU-vs-CPU embedding benchmark deliberately left for the operator to run from the main checkout after merge, per worktree-aware discipline — this worktree only owns the declarative fix and the docs. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-16 14:20:16 +02:00
# GPU przywrócone 2026-07-16: sterownik nvidia-driver-595-open (repo distro)
# zainstalowany, CUDA 13.2, nvidia-container-toolkit już obecny. Patrz
# kb/runbooks/ollama-solaria-cutover.md dla historii cutoveru.
fix(ollama): restore GPU reservation on SOLARIA, close 07-15 cutover docs Driver fixed 2026-07-16 (nvidia-driver-595-open from distro repo, old graphics-drivers PPA for jammy disabled) — RTX 4070 Ti SUPER 16GB, CUDA 13.2, nvidia-container-toolkit already present from the 07-15 cutover prerequisite install. Uncomments deploy.resources.reservations (nvidia gpu) in services/ollama/docker-compose.yml, restoring clean formatting. Docs close out the loose ends from the 07-15 declarative cutover: - ollama-solaria-cutover runbook gets a "Wykonanie" section documenting what actually happened (mv instead of rsync for the model store, the missing nvidia-container-toolkit prerequisite, the driver-missing discovery, CPU-only cutover, then the 07-16 GPU fix) plus a note on the container disappearing after the 07-15 evening reboot (one-off, boots fine now, root cause not established). - hosts/solaria/services.yaml: ollama role comment now reflects actual GPU-backed state instead of the previously-aspirational wording. - hosts/solaria/README.md: drop stale Open WebUI mention (not in repo). - docs/backlog.md: close the NVIDIA driver item; leave two follow-ups (Ollama call batching before the mail phase, UNIQUE(envelope_id, chunk_index) schema change for multi-model embeddings at phase 3). - jobs/documents-ingest/README.md: timing section gets a GPU placeholder line next to the existing 0.79s/chunk CPU baseline, to be filled in after the live GPU benchmark. Live recreate + GPU-vs-CPU embedding benchmark deliberately left for the operator to run from the main checkout after merge, per worktree-aware discipline — this worktree only owns the declarative fix and the docs. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-16 14:20:16 +02:00
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]