Docker Deployment
Docker Deployment
Section titled “Docker Deployment”Run OpenBiometrics on your own infrastructure. Free, no API key required.
Quick Start
Section titled “Quick Start”docker run -p 8000:8000 ghcr.ioapi:latestAPI available at http://localhost:8000. Swagger docs at http://localhost:8000/docs.
With GPU
Section titled “With GPU”services: api: image: ghcr.ioapi:latest ports: - "8000:8000" volumes: - ./watchlists:/app/watchlists deploy: resources: reservations: devices: - driver: nvidia count: 1 capabilities: [gpu]docker compose upCPU Only
Section titled “CPU Only”docker run -p 8000:8000 -e DEVICE=cpu ghcr.ioapi:latestPersistent Storage
Section titled “Persistent Storage”Mount volumes for watchlists and models:
docker run -p 8000:8000 \ -v $(pwd)/watchlists:/app/watchlists \ -v $(pwd)/models:/app/models \ ghcr.ioapi:latestOptional Modules
Section titled “Optional Modules”The base image includes face detection, verification, and liveness. To enable additional capabilities, install optional modules at build time or in a custom Dockerfile.
| Module | Extra | What it adds |
|---|---|---|
| Face (default) | — | Detection, verification, quality, demographics, liveness |
| Documents | documents | ID card, passport, and driver’s license OCR via python-doctr |
| Person Detection | person | Full-body detection and tracking via ultralytics |
| All modules | all | Everything above |
Custom Dockerfile
Section titled “Custom Dockerfile”FROM ghcr.ioapi:latest
# Add document processing supportRUN pip install openbiometrics-engine[documents]
# Or add everything# RUN pip install openbiometrics-engine[all]Docker Compose with All Modules
Section titled “Docker Compose with All Modules”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:latestRUN pip install openbiometrics-engine[all]Point Your SDK at It
Section titled “Point Your SDK at It”const ob = new OpenBiometrics({ apiKey: 'any-value', baseUrl: 'http://your-server:8000',});