- nvidia/cuda:12.4 runtime base matches the deploy host's driver stack (immich-ml / monitoring use the same pattern). - python3.12 via deadsnakes (Ubuntu 22.04 ships 3.10 only). - System deps: libmagic1 (python-magic), libgl1/libglib2 (PIL + PyMuPDF headless), curl (post-receive /healthz probe), ca-certs (httpx TLS). - uv sync --frozen --no-dev --extra ocr installs prod + Surya/torch; dev tooling stays out of the image. - CMD runs `alembic upgrade head && uvicorn ix.app:create_app` — idempotent. - Compose: single service, port 8994, GPU reservation mirroring immich-ml, labels for monitoring dashboard auto-discovery + backup opt-in. - host.docker.internal:host-gateway lets ix reach the host's Ollama and postgis containers (same pattern mammon uses). Task 5.1 of MVP plan. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
35 lines
1 KiB
YAML
35 lines
1 KiB
YAML
# InfoXtractor Docker Compose stack.
|
|
#
|
|
# Single service. Postgres + Ollama live in separate long-running
|
|
# containers on the host (postgis + ollama); we reach them via
|
|
# `host.docker.internal`, which is mapped to the gateway through
|
|
# `extra_hosts` so the container works whether the Compose plugin version
|
|
# adds it automatically or not.
|
|
#
|
|
# The GPU reservation block matches the shape used by immich-ml /
|
|
# monitoring on the same host, so the existing NVIDIA runtime
|
|
# configuration applies without changes.
|
|
|
|
services:
|
|
infoxtractor:
|
|
build: .
|
|
container_name: infoxtractor
|
|
restart: always
|
|
ports:
|
|
- "8994:8994"
|
|
env_file: .env
|
|
runtime: nvidia
|
|
deploy:
|
|
resources:
|
|
reservations:
|
|
devices:
|
|
- driver: nvidia
|
|
count: 1
|
|
capabilities: [gpu]
|
|
labels:
|
|
infrastructure.web_url: "http://192.168.68.42:8994"
|
|
backup.enable: "true"
|
|
backup.type: "postgres"
|
|
backup.name: "infoxtractor"
|
|
extra_hosts:
|
|
- "host.docker.internal:host-gateway"
|