CI fix + Drawbar-stack deploy pattern

CI was failing on the "Rebuild indexes from committed corpus" step
with httpx.ConnectError [Errno 111] — `localhost:11434` in the
OLLAMA_URL pool resolves to the Gitea Actions runner CONTAINER's
own localhost (no Ollama there), not the host. Fix: drop localhost
from CI's pool; it stays useful for dev runs from the workstation
where the TITAN X serves Ollama on the host loopback.

Final CI pool — 3 LAN endpoints, weighted to .0.125 (4090):
  .0.125:11434  ×4 (RTX 40-series, 242 embeds/sec)
  .0.2:11436    ×2 (GPU-pinned,    108 embeds/sec)
  .0.2:11435    ×1 (GPU-pinned,     72 embeds/sec)

deploy/docker-compose.yml — rewrite to match Drawbar's actual
parent-stack pattern, learned by inspecting how chem-mcp is
deployed on trashpanda:

  - Service name `seed-mcp` (matches chem-mcp's pattern). Reached
    via docker DNS as `seed-mcp:8080` from drawbar-backend-api.
  - Internal-only (no host port), expose 8080 only.
  - MCP_PORT=8080 inside container (chem-mcp uses 8080 too).
  - OLLAMA_URL via host.docker.internal:11434 (trashpanda's Ollama
    runs on the host). extra_hosts maps host-gateway.
  - RERANK_URL: http://llama-rerank:8080 — but llama-rerank is on
    the default `bridge` network, not drawbar-backend_default,
    so chem-mcp's reranker silently fails! Documented patch:
       docker network connect drawbar-backend_default llama-rerank
    Fixes rerank for BOTH chem-mcp (today: dense-only fallback)
    and the new seed-mcp.
  - Watchtower label set so CI pushes to :latest auto-deploy.

Documented llama-rerank service block as an alternative for
bringing the sidecar fully into the parent compose stack, with the
ubatch-size flag the seed corpus needs.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-25 17:23:03 -04:00
parent 038475e7fd
commit cd4a0f3148
3 changed files with 108 additions and 74 deletions
+5 -3
View File
@@ -32,9 +32,11 @@ env:
REGISTRY_PUSH: 192.168.0.2:1234
REGISTRY_PULL: git.jpaul.io
IMAGE: ${{ github.repository_owner }}/${{ github.event.repository.name }}
# 4-GPU pool, weighted toward .0.125 (4090). See refresh.yml for the
# bench numbers. .0.2:11434 excluded not GPU-pinned.
OLLAMA_URL: http://192.168.0.125:11434,http://192.168.0.125:11434,http://192.168.0.125:11434,http://192.168.0.125:11434,http://192.168.0.2:11436,http://192.168.0.2:11436,http://192.168.0.2:11435,http://localhost:11434
# 3-GPU LAN pool, weighted toward .0.125 (4090). See refresh.yml for
# the bench numbers. .0.2:11434 excluded (not GPU-pinned). localhost
# excluded from CI (runner container has no Ollama on its loopback;
# works in dev but fails in CI with connection refused).
OLLAMA_URL: http://192.168.0.125:11434,http://192.168.0.125:11434,http://192.168.0.125:11434,http://192.168.0.125:11434,http://192.168.0.2:11436,http://192.168.0.2:11436,http://192.168.0.2:11435
EMBED_MODEL: nomic-embed-text
PRODUCT_NAME: crop_seed
+6 -5
View File
@@ -34,16 +34,17 @@ env:
REGISTRY_PULL: git.jpaul.io
IMAGE: ${{ github.repository_owner }}/${{ github.event.repository.name }}
# Embedder pool — 4 GPUs total, with .0.125 (RTX 40-series) listed
# multiple times to weight the round-robin scheduler toward the
# fastest endpoint. Measured throughput (50-chunk batches on
# Embedder pool — 3 GPU-pinned endpoints reachable from the runner
# container on .0.2. Measured throughput (50-chunk batches on
# nomic-embed-text):
# .0.125:11434 (4090) 242 embeds/sec ← weighted ×4
# .0.2:11436 (GPU-pinned) 108 embeds/sec ← weighted ×2
# .0.2:11435 (GPU-pinned) 72 embeds/sec ← weight 1
# localhost (TITAN X) 37 embeds/sec ← weight 1
# NOTE: .0.2:11434 is NOT GPU-pinned — exclude.
OLLAMA_URL: http://192.168.0.125:11434,http://192.168.0.125:11434,http://192.168.0.125:11434,http://192.168.0.125:11434,http://192.168.0.2:11436,http://192.168.0.2:11436,http://192.168.0.2:11435,http://localhost:11434
# NOTE: `localhost:11434` works locally during dev but resolves to the
# runner CONTAINER's own localhost in CI (no Ollama there → 111
# connection refused). Use only LAN endpoints from CI.
OLLAMA_URL: http://192.168.0.125:11434,http://192.168.0.125:11434,http://192.168.0.125:11434,http://192.168.0.125:11434,http://192.168.0.2:11436,http://192.168.0.2:11436,http://192.168.0.2:11435
EMBED_MODEL: nomic-embed-text
PRODUCT_NAME: crop_seed