Skip to content

Docker Deployment

Run OpenBiometrics on your own infrastructure. Free, no API key required.

Terminal window
docker run -p 8000:8000 ghcr.ioapi:latest

API available at http://localhost:8000. Swagger docs at http://localhost:8000/docs.

docker-compose.yml
services:
api:
image: ghcr.ioapi:latest
ports:
- "8000:8000"
volumes:
- ./watchlists:/app/watchlists
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
Terminal window
docker compose up
Terminal window
docker run -p 8000:8000 -e DEVICE=cpu ghcr.ioapi:latest

Mount volumes for watchlists and models:

Terminal window
docker run -p 8000:8000 \
-v $(pwd)/watchlists:/app/watchlists \
-v $(pwd)/models:/app/models \
ghcr.ioapi:latest

The base image includes face detection, verification, and liveness. To enable additional capabilities, install optional modules at build time or in a custom Dockerfile.

ModuleExtraWhat it adds
Face (default)Detection, verification, quality, demographics, liveness
DocumentsdocumentsID card, passport, and driver’s license OCR via python-doctr
Person DetectionpersonFull-body detection and tracking via ultralytics
All modulesallEverything above
FROM ghcr.ioapi:latest
# Add document processing support
RUN pip install openbiometrics-engine[documents]
# Or add everything
# RUN pip install openbiometrics-engine[all]
docker-compose.yml
services:
api:
build:
context: .
dockerfile: Dockerfile
ports:
- "8000:8000"
volumes:
- ./watchlists:/app/watchlists
- ./models:/app/models
environment:
- MODULES=face,documents,person
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]

Where Dockerfile contains:

FROM ghcr.ioapi:latest
RUN pip install openbiometrics-engine[all]
const ob = new OpenBiometrics({
apiKey: 'any-value',
baseUrl: 'http://your-server:8000',
});