docker update --memory 8g --cpus 4 nodetool-<container.name>
nodetool deploy apply sets no memory or CPU limits. deployment.yaml has no field for them, and the deployer passes only --gpus "device=<container.gpu>" when container.gpu is set. docker update caps a deployer-managed container but does not survive the next apply. For persistent caps, run the container yourself with docker run or Compose.
Runs: any Docker host. Needs:
DB_PATHorDATABASE_URL, and--gpus allfor GPU access. Hardware: the 8 GB and 4 CPU figures below are starting points, not measured requirements.
Baseline Settings
- Cap memory and CPU on every container. Start with
--memory 8gand--cpus 4on GPU hosts and tune fromdocker stats. - Mount a Hugging Face cache read-only only when models are already downloaded. The server cannot add models to a read-only cache.
nodetool deploymountspaths.hf_cacheat/hf-cacheread-only unlesspersistent_pathsis set. - Mount the workspace read/write. The image runs as the
nodeuser, so the host directory must be writable by it.
Local Docker Runs
docker run --gpus all \
--memory 8g --cpus 4 \
-v /data/nodetool/workspace:/workspace \
-v /data/hf-cache:/hf-cache:ro \
-e DB_PATH=/workspace/nodetool.db \
-e HF_HOME=/hf-cache \
-p 7777:7777 \
ghcr.io/nodetool-ai/nodetool:latest
In Compose, use mem_limit and cpus on the service, or deploy.resources.limits. The reference docker-compose.yml sets none.
--memory-reservationsets soft limits when co-locating servers.- The image generates a master key under
/workspace/.secrets_master_keywhenSECRETS_MASTER_KEYis unset, so keep/workspaceon a persistent volume. TMPDIR=/workspace/tmpkeeps per-run temp data on the workspace volume through restarts.
If it fails
- Container exits at start with
ERROR: No database configured. Set DATABASE_URL (PostgreSQL) or DB_PATH (SQLite).: set one of them. - Runs are OOM-killed (
docker statsshows the container at its limit, or restarting): lower batch sizes in the workflow or raise--memoryin steps. - Cache write errors: the HF cache mounted
:rocannot take new models. Mount it read/write or download models elsewhere. For storage-heavy jobs see Storage.