Complete guide for setting up OpenProcessor on your system.
git clone https://github.com/davidamacey/OpenProcessor.git && cd OpenProcessor && ./scripts/setup.shgit clone https://github.com/davidamacey/OpenProcessor.git
cd OpenProcessor
./scripts/setup.sh# Accept all defaults
./scripts/setup.sh --yes
# Specify profile and GPU
./scripts/setup.sh --profile=standard --gpu=0 --yes
# Skip TensorRT export (if models already exported)
./scripts/setup.sh --skip-export --yesThe setup script will:
- Check prerequisites (Docker, NVIDIA drivers)
- Detect your GPU and select the optimal profile
- Pull pre-built Docker images from Docker Hub (~32GB)
- Download required models (~500MB, ~16 seconds)
- Export models to TensorRT (~30-60 minutes, one-time only)
- Generate configuration files
- Start all services
- Run smoke tests
First-time setup takes ~30-60 minutes (mostly TensorRT compilation). Subsequent starts take ~30 seconds since compiled engines are cached on disk.
| Software | Minimum Version | Installation |
|---|---|---|
| Docker | 20.10+ | docs.docker.com |
| Docker Compose | v2.0+ | Included with Docker Desktop |
| NVIDIA Driver | 535+ | nvidia.com/drivers |
| NVIDIA Container Toolkit | Latest | See below |
| Requirement | Minimum | Recommended |
|---|---|---|
| GPU VRAM | 6GB | 12GB+ |
| GPU Architecture | Ampere (30-series) | Ampere or newer |
| System RAM | 16GB | 32GB+ |
| CPU Cores | 8 | 16+ |
| Storage | 20GB free | 50GB+ (SSD recommended) |
Install the NVIDIA Container Toolkit to enable GPU access in Docker:
# Ubuntu/Debian
curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg
curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | \
sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \
sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list
sudo apt-get update
sudo apt-get install -y nvidia-container-toolkit
# Configure Docker
sudo nvidia-ctk runtime configure --runtime=docker
sudo systemctl restart docker
# Verify toolkit is configured
docker info | grep -i nvidia
nvidia-smiThe system automatically selects a profile based on your GPU's VRAM:
| Profile | VRAM Range | Models | Performance | Use Case |
|---|---|---|---|---|
| minimal | 6-8GB | Core only | ~5 RPS | RTX 3060, RTX 4060 |
| standard | 12-24GB | All | ~15 RPS | RTX 3080, RTX 4090 |
| full | 48GB+ | All | ~50 RPS | A6000, A100 |
minimal (6-8GB GPUs):
- YOLO object detection
- SCRFD face detection
- ArcFace embeddings
- MobileCLIP embeddings
- No OCR (optional add-on)
- 1 instance per model, batch size 16
standard (12-24GB GPUs):
- All models including OCR
- 2 instances per model, batch size 32
- Good for most production workloads
full (48GB+ GPUs):
- All models with maximum parallelism
- 4 instances per model, batch size 64
- High-throughput production systems
# During setup
./scripts/setup.sh --profile=minimal
# After setup
./scripts/openprocessor.sh profile minimal
./scripts/openprocessor.sh restartIf you prefer to run steps individually:
git clone https://github.com/davidamacey/OpenProcessor.git
cd OpenProcessormkdir -p pytorch_models logs cache/huggingface outputs test_resultsModels are downloaded from public sources (no authentication required):
# All models (~500MB)
./scripts/openprocessor.sh download all
# Or essential only (~250MB)
./scripts/openprocessor.sh download essential
# Check download status
./scripts/openprocessor.sh download statusCopy and edit the environment template:
cp env.template .env
# Edit .env to adjust settingsOr generate automatically:
./scripts/openprocessor.sh profile standarddocker compose up -d triton-server yolo-apiThis step converts models to optimized TensorRT format:
# All models (45-60 minutes)
./scripts/openprocessor.sh export all
# Or essential only (25-35 minutes)
./scripts/openprocessor.sh export essential
# Check export status
./scripts/openprocessor.sh export statusdocker compose up -d# Check status
./scripts/openprocessor.sh status
# Run smoke tests
./scripts/openprocessor.sh test quick
# Test API directly
curl http://localhost:4603/healthSymptoms: Services crash, "CUDA out of memory" errors
Solutions:
-
Switch to a smaller profile:
./scripts/openprocessor.sh profile minimal ./scripts/openprocessor.sh restart
-
Reduce batch size in
.env:MAX_BATCH_SIZE=8
-
Stop other GPU processes:
nvidia-smi # Check what's using GPU
Symptoms: Export hangs or errors during trtexec
Solutions:
-
Check GPU memory is available:
nvidia-smi # Need 4GB+ free -
Unload existing models first:
docker compose stop triton-server ./scripts/openprocessor.sh export all docker compose start triton-server -
Check CUDA version compatibility:
nvidia-smi # Driver version docker compose exec triton-server nvidia-smi # Container CUDA version
Symptoms: Triton shows "UNAVAILABLE" for models
Solutions:
-
Check if exports exist:
./scripts/openprocessor.sh export status -
Check Triton logs:
./scripts/openprocessor.sh logs triton-server
-
Verify model configs:
ls -la models/*/config.pbtxt
Symptoms: "Permission denied" when running Docker commands
Solutions:
-
Add user to docker group:
sudo usermod -aG docker $USER # Log out and back in
-
Check Docker socket permissions:
ls -la /var/run/docker.sock
Symptoms: docker compose up fails
Solutions:
-
Check port conflicts:
lsof -i :4603 # API port lsof -i :4600 # Triton port
-
Check disk space:
df -h
-
View detailed errors:
docker compose up # Without -d to see output
git pull
./scripts/openprocessor.sh update
./scripts/openprocessor.sh restartdocker compose build --no-cache
docker compose up -dAfter major updates, you may need to re-export TensorRT models:
./scripts/openprocessor.sh export all
./scripts/openprocessor.sh restartdocker compose down -v # -v removes volumesdocker compose down --rmi all# Remove generated files
rm -rf pytorch_models/*.pt pytorch_models/*.onnx
rm -rf models/*/1/model.plan
rm -rf .env docker-compose.override.yml
rm -rf cache/ logs/ outputs/ test_results/The project includes production-optimized Dockerfiles:
| File | Purpose | Base Image |
|---|---|---|
Dockerfile |
FastAPI service | python:3.13-slim-trixie |
Dockerfile.triton |
Triton server | nvcr.io/nvidia/tritonserver:25.10-py3 |
# Build and push to Docker Hub
./scripts/docker-build-push.sh all
# Build locally without pushing
./scripts/docker-build-push.sh local
# Build with specific version
VERSION=v1.0.0 ./scripts/docker-build-push.sh allThe project includes comprehensive security scanning using free, open-source tools:
Tools Used:
- Hadolint - Dockerfile linting
- Dockle - CIS Docker Benchmark compliance
- Trivy - Vulnerability scanning
- Grype - Fast vulnerability scanning
- Syft - SBOM (Software Bill of Materials) generation
# Install security scanning tools
./scripts/security-scan.sh install
# Scan all images
./scripts/security-scan.sh all
# Scan specific image
./scripts/security-scan.sh api
# View reports
ls -la security-reports/Reports Generated:
*-hadolint.txt- Dockerfile linting results*-dockle.json- CIS best practices check*-sbom.json- Software Bill of Materials (CycloneDX)*-trivy.json/txt- Vulnerability scan results*-grype.json/txt- Additional vulnerability scan
For automated builds in CI/CD pipelines:
# Fail on security issues
FAIL_ON_SECURITY_ISSUES=true FAIL_ON_CRITICAL=true ./scripts/docker-build-push.sh all
# Skip scanning for faster builds
SKIP_SECURITY_SCAN=true ./scripts/docker-build-push.sh all- Documentation: See README.md and CLAUDE.md
- Issues: Report bugs at GitHub Issues
- Logs: Check
./scripts/openprocessor.sh logsfor debugging