-
Notifications
You must be signed in to change notification settings - Fork 91
Expand file tree
/
Copy pathdocker-compose.gpu.yml
More file actions
48 lines (40 loc) · 1.17 KB
/
docker-compose.gpu.yml
File metadata and controls
48 lines (40 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
services:
deepseek-ocr-gpu:
build:
context: .
dockerfile: Dockerfile.gpu
container_name: deepseek-ocr-gpu
image: deepseek-ocr-gpu:latest
runtime: nvidia
ports:
- "0.0.0.0:8001:8001"
environment:
- NVIDIA_VISIBLE_DEVICES=${NVIDIA_VISIBLE_DEVICES:-0}
- CUDA_VISIBLE_DEVICES=0
- GPU_IDLE_TIMEOUT=${GPU_IDLE_TIMEOUT:-60}
- PYTHONUNBUFFERED=1
- PYTORCH_CUDA_ALLOC_CONF=${PYTORCH_CUDA_ALLOC_CONF:-expandable_segments:True,max_split_size_mb:128}
- OCR_BASE_SIZE=${OCR_BASE_SIZE:-768}
- OCR_IMAGE_SIZE=${OCR_IMAGE_SIZE:-448}
- OCR_CROP_MODE=${OCR_CROP_MODE:-true}
volumes:
- ./models:/root/.cache/huggingface
- ./logs:/app/logs
shm_size: "8g"
restart: unless-stopped
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8001/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 5m
mem_limit: 32g
memswap_limit: 32g
network_mode: bridge