Docker¶
Full stack (recommended)¶
Run Postgres, Redis, the API server, and the arq worker — all in containers:
dev.sh builds the inference-engine image and starts all services via Docker Compose. See Docker Compose for a full breakdown of services, volumes, and profiles.
Dockerfile¶
The project ships a two-stage Dockerfile:
- builder — installs Python dependencies into
.venvviauv sync --frozen --no-dev - runtime — copies
.venvandapp/into a cleanpython:3.12-slimimage under a non-rootappuser
Build and run standalone (falls back to SQLite + in-process async — no Postgres/Redis needed):
docker build -t inference-engine .
docker run -p 8000:8000 \
-e API_KEYS="key1:tenant_a:predict,read_models" \
-e ENV=production \
inference-engine
Services and ports¶
| Service | Host port |
|---|---|
| API server | 8000 |
| Postgres | 15432 |
| Redis | 6379 |
Observability stack¶
Starts Prometheus (9090) and Grafana (3000) alongside the core services. To add observability to an already-running stack:
See Docker Compose for the full reference.