-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
63 lines (62 loc) · 1.67 KB
/
Copy pathdocker-compose.yml
File metadata and controls
63 lines (62 loc) · 1.67 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
services:
cpu:
build:
context: .
dockerfile: Dockerfile
image: tuzkaocr:cpu
env_file:
- ./tuzkaocr.env
environment:
TUZKAOCR_RESULTS_DIR: /app/results
TUZKAOCR_SPOOL_DIR: /app/spool
user: "${TUZKAOCR_RUN_UID:-1000}:${TUZKAOCR_RUN_GID:-1000}"
ports:
- "${TUZKAOCR_CPU_PORT:-8000}:8000"
volumes:
- ./results:/app/results
- ./spool:/app/spool
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/healthz', timeout=5).read()"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
restart: unless-stopped
security_opt:
- no-new-privileges:true
stop_grace_period: 120s
gpu:
build:
context: .
dockerfile: Dockerfile.gpu
image: tuzkaocr:gpu
env_file:
- ./tuzkaocr.env
environment:
TUZKAOCR_DEVICE: cuda
TUZKAOCR_RESULTS_DIR: /app/results
TUZKAOCR_SPOOL_DIR: /app/spool
user: "${TUZKAOCR_RUN_UID:-1000}:${TUZKAOCR_RUN_GID:-1000}"
ports:
- "${TUZKAOCR_GPU_PORT:-8001}:8000"
volumes:
- ./results:/app/results
- ./spool:/app/spool
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/healthz', timeout=5).read()"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
restart: unless-stopped
security_opt:
- no-new-privileges:true
stop_grace_period: 120s
profiles: [gpu]