init repo
This commit is contained in:
53
docker-compose.yml
Normal file
53
docker-compose.yml
Normal file
@@ -0,0 +1,53 @@
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
doc-processer:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
container_name: doc-processer
|
||||
ports:
|
||||
- "8053:8053"
|
||||
environment:
|
||||
- PADDLEOCR_VL_URL=http://host.docker.internal:8080/v1
|
||||
- DOCLAYOUT_MODEL_PATH=/app/models/DocLayout/doclayout_yolo_docstructbench_imgsz1024.pt
|
||||
- PP_DOCLAYOUT_MODEL_DIR=/app/models/PP-DocLayout
|
||||
- MAX_IMAGE_SIZE_MB=10
|
||||
volumes:
|
||||
# Mount pre-downloaded models (adjust paths as needed)
|
||||
- ./models/DocLayout:/app/models/DocLayout:ro
|
||||
- ./models/PP-DocLayout:/app/models/PP-DocLayout:ro
|
||||
deploy:
|
||||
resources:
|
||||
reservations:
|
||||
devices:
|
||||
- driver: nvidia
|
||||
count: 1
|
||||
capabilities: [gpu]
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8053/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 10s
|
||||
|
||||
# Optional: Local development without GPU
|
||||
doc-processer-cpu:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
container_name: doc-processer-cpu
|
||||
ports:
|
||||
- "8054:8053"
|
||||
environment:
|
||||
- PADDLEOCR_VL_URL=http://host.docker.internal:8080/v1
|
||||
- DOCLAYOUT_MODEL_PATH=/app/models/DocLayout/doclayout_yolo_docstructbench_imgsz1024.pt
|
||||
- PP_DOCLAYOUT_MODEL_DIR=/app/models/PP-DocLayout
|
||||
volumes:
|
||||
- ./models/DocLayout:/app/models/DocLayout:ro
|
||||
- ./models/PP-DocLayout:/app/models/PP-DocLayout:ro
|
||||
profiles:
|
||||
- cpu
|
||||
restart: unless-stopped
|
||||
|
||||
Reference in New Issue
Block a user