-
Notifications
You must be signed in to change notification settings - Fork 788
/
docker-compose-gpu.yml
119 lines (113 loc) · 3.6 KB
/
docker-compose-gpu.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
version: '3.4'
volumes:
postgres-data:
services:
compreface-postgres-db:
image: ${registry}compreface-postgres-db:${POSTGRES_VERSION}
container_name: "compreface-postgres-db"
build: ../db
ports:
- "6432:5432"
environment:
- POSTGRES_USER=${postgres_username}
- POSTGRES_PASSWORD=${postgres_password}
- POSTGRES_DB=${postgres_db}
volumes:
- postgres-data:/var/lib/postgresql/data
compreface-admin:
image: ${registry}compreface-admin:${ADMIN_VERSION}
build:
context: ../java
dockerfile: ../dev/Dockerfile
target: frs_crud
container_name: "compreface-admin"
ports:
- "8081:8080"
- "5006:5005"
environment:
- POSTGRES_USER=${postgres_username}
- POSTGRES_PASSWORD=${postgres_password}
- POSTGRES_URL=jdbc:postgresql://${postgres_domain}:${postgres_port}/${postgres_db}
- SPRING_PROFILES_ACTIVE=dev
- ENABLE_EMAIL_SERVER=${enable_email_server}
- EMAIL_HOST=${email_host}
- EMAIL_USERNAME=${email_username}
- EMAIL_FROM=${email_from}
- EMAIL_PASSWORD=${email_password}
- ADMIN_JAVA_OPTS=${compreface_admin_java_options}
- MAX_FILE_SIZE=${max_file_size}
- MAX_REQUEST_SIZE=${max_request_size}B
depends_on:
- compreface-postgres-db
- compreface-api
compreface-api:
image: ${registry}compreface-api:${API_VERSION}
build:
context: ../java
dockerfile: ../dev/Dockerfile
target: frs_core
args:
- ND4J_CLASSIFIER=${ND4J_CLASSIFIER}
container_name: "compreface-api"
ports:
- "8082:8080"
- "5005:5005"
depends_on:
- compreface-postgres-db
environment:
- POSTGRES_USER=${postgres_username}
- POSTGRES_PASSWORD=${postgres_password}
- POSTGRES_URL=jdbc:postgresql://${postgres_domain}:${postgres_port}/${postgres_db}
- SPRING_PROFILES_ACTIVE=dev
- API_JAVA_OPTS=${compreface_api_java_options}
- SAVE_IMAGES_TO_DB=${save_images_to_db}
- MAX_FILE_SIZE=${max_file_size}
- MAX_REQUEST_SIZE=${max_request_size}B
- CONNECTION_TIMEOUT=${connection_timeout:-10000}
- READ_TIMEOUT=${read_timeout:-60000}
compreface-fe:
image: ${registry}compreface-fe:${FE_VERSION}
build:
context: ../ui
dockerfile: docker-prod/Dockerfile
container_name: "compreface-ui"
ports:
- "8000:80"
depends_on:
- compreface-api
- compreface-admin
environment:
- CLIENT_MAX_BODY_SIZE=${max_request_size}
- PROXY_READ_TIMEOUT=${read_timeout:-60000}ms
- PROXY_CONNECT_TIMEOUT=${connection_timeout:-10000}ms
compreface-core:
image: ${registry}compreface-core:${CORE_VERSION}
container_name: "compreface-core"
ports:
- "3300:3000"
build:
context: ../embedding-calculator
args:
- FACE_DETECTION_PLUGIN=insightface.FaceDetector@retinaface_r50_v1
- CALCULATION_PLUGIN=insightface.Calculator@arcface_r100_v1
- EXTRA_PLUGINS=insightface.LandmarksDetector,insightface.GenderDetector,insightface.AgeDetector
- BASE_IMAGE=compreface-core-base:base-cuda100-py37
- GPU_IDX=0
environment:
- ML_PORT=3000
- IMG_LENGTH_LIMIT=${max_detect_size}
- UWSGI_PROCESSES=${uwsgi_processes:-1}
- UWSGI_THREADS=${uwsgi_threads:-1}
healthcheck:
test: curl --fail http://localhost:3000/healthcheck || exit 1
interval: 10s
retries: 0
start_period: 0s
timeout: 1s
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]