Chunkr can be deployed using Docker Compose with support for both GPU and CPU configurations. This guide covers the complete deployment process.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/lumina-ai-inc/chunkr/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Before deploying Chunkr, ensure you have:- Docker Engine 20.10 or later
- Docker Compose V2
- For GPU deployment: NVIDIA Docker runtime and compatible GPU
- At least 16GB of RAM (32GB+ recommended for production)
- Sufficient disk space for models and data storage
Quick Start
Configure environment variables
Copy the example environment file and configure it:See the Environment Variables page for detailed configuration options.
Service Architecture
Chunkr deploys the following services:| Service | Port | Description |
|---|---|---|
| server | 8000 | Main API server handling requests |
| task | - | Background task workers (30 replicas) |
| web | 5173 | Web UI interface |
| segmentation | 8001 | Document segmentation service with nginx load balancer |
| segmentation-backend | - | Segmentation model workers (6 replicas) |
| ocr | 8002 | OCR service with nginx load balancer |
| ocr-backend | - | OCR model workers (3 replicas) |
| postgres | 5432 | PostgreSQL database |
| redis | 6379 | Redis for task queue and caching |
| minio | 9000, 9001 | S3-compatible object storage |
| keycloak | 8080 | Authentication and authorization |
| adminer | 8082 | Database management interface |
Deployment Configurations
GPU Deployment (Default)
The defaultcompose.yaml is optimized for GPU acceleration:
GPU deployment provides significantly faster inference times. See GPU Setup for configuration details.
CPU-Only Deployment
For environments without GPU support, use the CPU overlay:- Reduces task workers from 30 to 10 replicas
- Uses optimized CPU threading settings
- Employs smaller model variants for OCR
- Adjusts batch sizes for CPU performance
Mac Deployment (Apple Silicon)
For Mac development environments:Model Configuration
Chunkr uses amodels.yaml file to configure LLM models. This file is mounted as a read-only volume:
models.yaml file exists in the root directory before starting services.
Managing Services
View Logs
Restart Services
Stop Services
Update Services
Health Checks
Several services include health checks to ensure proper startup:- PostgreSQL: Checks database readiness every 10s
- Redis: Pings Redis every 10s
- MinIO: Checks storage health every 30s
- Keycloak: Verifies auth service every 30s with 10-minute startup period
Persistent Data
The following volumes persist data across container restarts:Troubleshooting
Services won’t start
- Check Docker daemon is running
- Verify port availability (8000, 5173, 5432, 6379, 9000, 8080)
- Review logs:
docker compose logs
Out of memory errors
- Reduce replica counts in compose.yaml
- Increase Docker memory limits
- Consider CPU-only deployment for lower memory usage
GPU not detected
- Verify NVIDIA Docker runtime:
docker run --rm --gpus all nvidia/cuda:11.8.0-base-ubuntu22.04 nvidia-smi - Check GPU configuration in GPU Setup
- Ensure drivers are properly installed
Next Steps
- Configure Environment Variables
- Set up GPU acceleration
- Learn about Scaling for production workloads