36 lines
954 B
YAML
36 lines
954 B
YAML
|
|
# docker-compose.gpu-registry.yml - Pull GPU image from registry
|
||
|
|
# Usage: docker compose -f docker-compose.gpu-registry.yml up
|
||
|
|
#
|
||
|
|
# Requires: NVIDIA GPU + nvidia-container-toolkit installed
|
||
|
|
|
||
|
|
services:
|
||
|
|
ocr-gpu:
|
||
|
|
image: seryus.ddns.net/unir/paddle-ocr-gpu:arm64
|
||
|
|
container_name: paddle-ocr-gpu-registry
|
||
|
|
ports:
|
||
|
|
- "8002:8000"
|
||
|
|
volumes:
|
||
|
|
- ../dataset:/app/dataset:ro
|
||
|
|
- paddlex-cache:/root/.paddlex
|
||
|
|
environment:
|
||
|
|
- PYTHONUNBUFFERED=1
|
||
|
|
- CUDA_VISIBLE_DEVICES=0
|
||
|
|
deploy:
|
||
|
|
resources:
|
||
|
|
reservations:
|
||
|
|
devices:
|
||
|
|
- driver: nvidia
|
||
|
|
count: 1
|
||
|
|
capabilities: [gpu]
|
||
|
|
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
|