services: backend: build: context: . dockerfile: Dockerfile.backend container_name: paddleocr-backend ports: - "8001:8000" environment: - VLLM_API_URL=http://host.docker.internal:10024/v1/chat/completions - VLLM_API_KEY=unused - VLLM_MODEL_NAME=PaddlePaddle/PaddleOCR-VL-1.5 # RTX 6000 Blackwell Optimized (98GB VRAM) - MAX_GENERATION_TOKENS=4096 - MAX_BATCH_SIZE=32 - MAX_CONCURRENT_REQUESTS=64 - MAX_PARALLEL_BATCHES=12 - BATCH_JOB_PAGES_PER_BATCH=4 - IMAGE_MAX_SIZE=2048 - IMAGE_JPEG_QUALITY=95 - TIMEOUT_SECONDS=60 - MAX_NUM_SEQS=256 - MAX_NUM_BATCHED_TOKENS=32768 extra_hosts: - "host.docker.internal:host-gateway" restart: unless-stopped healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8001/health"] interval: 30s timeout: 10s retries: 3 networks: - paddle-network frontend: build: context: . dockerfile: Dockerfile.frontend container_name: paddleocr-frontend ports: - "8502:8501" environment: # Default backend URL (will be auto-detected from browser for LAN access) # Use port 8000 internally (not 8001) since containers communicate on Docker network - BACKEND_URL=http://backend:8000 depends_on: - backend extra_hosts: - "host.docker.internal:host-gateway" restart: unless-stopped healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8501 > /dev/null 2>&1"] interval: 30s timeout: 10s retries: 3 networks: - paddle-network networks: paddle-network: external: true name: paddle-network