# docker-compose.cpu-registry.yml - Pull CPU image from registry
# Usage: docker compose -f docker-compose.cpu-registry.yml up

services:
  ocr-cpu:
    image: seryus.ddns.net/unir/paddle-ocr-cpu:latest
    container_name: paddle-ocr-cpu-registry
    ports:
      - "8001:8000"
    volumes:
      - ../dataset:/app/dataset:ro
      - ../debugset:/app/debugset:rw
      - paddlex-cache:/root/.paddlex
    environment:
      - PYTHONUNBUFFERED=1
    restart: unless-stopped
    healthcheck:
      test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 60s

volumes:
  paddlex-cache:
    name: paddlex-model-cache
