-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
40 lines (34 loc) · 1.17 KB
/
docker-compose.yml
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
version: "3.9"
services:
ocrd-controller:
build:
context: .
# args:
# VCS_REF: ...
# BUILD_DATE: ...
image: ${CONTROLLER_IMAGE}
hostname: ${CONTROLLER_HOST}
environment:
- UID=${CONTROLLER_ENV_UID}
- GID=${CONTROLLER_ENV_GID}
- UMASK=${CONTROLLER_ENV_UMASK}
- WORKERS=${CONTROLLER_WORKERS}
volumes:
- type: bind
source: ${CONTROLLER_KEYS:-controller-keys-not-defined} # ocrd manager public key
target: /authorized_keys
- ${CONTROLLER_MODELS:-controller-models-not-defined}:/models
- ${CONTROLLER_DATA:-controller-data-not-defined}:/data
deploy:
resources:
limits:
cpus: ${CONTROLLER_WORKERS}
reservations:
devices:
- capabilities: [gpu]
# we want to reserve _up to_ 1 device
# (not more, because 1 can typically be shared across workers already,
# and for physical multi-GPU, we should instead use swarm anyway)
# but the semantics of "count" is _at least_ unfortunately
# (which would fail on CPU-only systems), so just leave unspecified
# count: 1