-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
44 lines (40 loc) · 1.36 KB
/
Copy pathdocker-compose.yml
File metadata and controls
44 lines (40 loc) · 1.36 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
# Extension fields are only recognised at the top level. Nested under
# `services:` this anchor was parsed as a real service and compose built a
# stray face_recognition-x-base-1 container from it.
x-base: &base
build: .
# Application settings live in config.toml, not here — it is bind-mounted
# below, so editing it takes effect on the next container start with no
# rebuild. Only X11 plumbing stays in the environment. (Settings CAN still be
# overridden per-service with USE_GPU / SPOOF_THRESH / ORT_THREADS /
# SPOOF_MODEL_DIR / CAPTURE_DIR / DB_PATH, which beat the file — handy for a
# one-off, but the file is the place to make a change stick.)
environment:
- DISPLAY=${DISPLAY}
- QT_X11_NO_MITSHM=1
volumes:
- ./Dataset:/app/Dataset
- ./config.toml:/app/config.toml:ro
- /tmp/.X11-unix:/tmp/.X11-unix:rw
devices:
- /dev/video0:/dev/video0
# network_mode: host # uncomment for RTSP on host LAN
services:
enroll:
<<: *base
container_name: face-enroll
stdin_open: true
tty: true
command: python enroll_new_faces.py
recognize:
<<: *base
container_name: face-recognize
restart: unless-stopped
command: python face_recognition.py
web:
<<: *base
container_name: face-web
restart: unless-stopped
ports:
- "8000:8000"
command: uvicorn app:app --host 0.0.0.0 --port 8000