services: api: build: context: . args: # Swap to https://download.pytorch.org/whl/cu128 for the CUDA image. TORCH_INDEX: ${TORCH_INDEX:-https://download.pytorch.org/whl/cpu} environment: # The CLI backend needs an interactive Claude Code login, which a container does not have, # so the container runs on the API backend and wants a key. ANSWER_BACKEND: ${ANSWER_BACKEND:-api} DOCASSIST_API_KEY: ${DOCASSIST_API_KEY:-} volumes: - ./models:/app/models:ro # hf download, see README - ./.cache:/app/.cache # LLM summaries + HF cache, keyed by content hash - ./workspaces:/app/workspaces # cloned and uploaded repositories - ./results:/app/results # eval runs the dashboard reads ports: - "8000:8000" web: build: ./web depends_on: - api ports: - "5173:80" # GPU: `docker compose --profile gpu up` after installing the NVIDIA container toolkit, and # build with TORCH_INDEX pointing at the cu128 wheels. Without it the models run on CPU, which # works but turns a ~500ms rerank into several seconds. api-gpu: profiles: ["gpu"] extends: service: api deploy: resources: reservations: devices: - driver: nvidia count: 1 capabilities: [gpu]