Installation¶
System Requirements¶
| Component | Why it is needed |
|---|---|
| Docker + docker compose | Runs the app and ollama services defined in compose.yml. |
| NVIDIA Container Toolkit | Exposes host GPUs to the ollama container. |
| At least 40 GB free disk | LLM weights (e.g. ~40 GB for the 70 B Llama). |
obolibrary/robot:latest Docker image |
Required by Ontology Preparation (auto-pulled on first use). |
gawk on the host |
Used by the Plant Ontology preprocess step in scripts/build_subset_ontologies.sh. The ROBOT image ships mawk, which lacks gensub(). Install with apt-get install gawk (Debian/Ubuntu) or brew install gawk (macOS). |
| Python 3.10+ and uv | Only for local (non-Docker) development. |
Docker Compose (Recommended)¶
Setup¶
This builds the app image, pulls ollama/ollama:0.32.15, and starts both containers on the bsllmner-mk2-network bridge. Named volumes:
bsllmner-mk2_venv-- the project's.venvinside theappcontainer.bsllmner-mk2_ollama-data-- Ollama's model cache (/root/.ollama).
The host's project directory is bind-mounted at /app, so source edits take effect without rebuilding.
GPU Configuration¶
compose.yml reserves every visible NVIDIA GPU (deploy.resources.reservations.devices.count: all) and the ollama service narrows the active set with CUDA_VISIBLE_DEVICES. The committed default is 0,1 (two GPUs). On a single-GPU host:
For Ollama performance tuning (KV cache, flash attention, context length tiers), see Configuration.
uv (Local Development)¶
For running tests, type checks, or the CLI directly on the host:
If the Ollama server is on a different host, set OLLAMA_HOST: