-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
106 lines (97 loc) · 2.43 KB
/
docker-compose.yaml
File metadata and controls
106 lines (97 loc) · 2.43 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
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
version: "3.0"
services:
# # Database
db:
container_name: 'db'
image: postgres:15
restart: always
environment:
POSTGRES_USER: user
POSTGRES_PASSWORD: password
POSTGRES_DB: vision_notify
ports:
- "5432:5432"
volumes:
- ./db/:/var/lib/postgresql/data/
networks:
- service-networks
# # 後台
backend:
build:
context: ./web
dockerfile: Dockerfile
restart: always
environment:
FLASK_APP: app.py
FLASK_ENV: development
volumes:
- ./web:/app
ports:
- "5000:5000"
# command: sh -c "python app.py"
command: gunicorn -w 4 -b 0.0.0.0:5000 app:app
# command: sh -c "sleep 100000"
networks:
- service-networks
# # redis 攝影機控制分配
camera_ctrl:
container_name: camera_ctrl_dev
image: danlee01633060/camera_ctrl:lastest
build:
context: ./camera_ctrler
dockerfile: cameractrlDockerfile
stdin_open: true
tty: true
restart: always
depends_on:
- backend
volumes:
- ./object_recognition/saved_images/stream/:/app/stream
- ./camera_ctrler:/app
- ./rtsp_test/frames/:/app/image
environment:
- SERVERIP=http://backend:5000
ports:
- "15440:5000"
# command: sh -c "flask run --no-debugger --host 0.0.0.0"
command: gunicorn -w 4 -b 0.0.0.0:5000 app:app
networks:
- service-networks
# 鏡頭影像辨識
objectrecognition:
container_name: object_recognition
image: danlee01633060/object_recognition:latest
build:
context: ./object_recognition
dockerfile: objectrecognitionDockerfile
user: "0:0"
restart: always
depends_on:
- camera_ctrl
stdin_open: true
tty: true
volumes:
- ./rtsp_test/frames/:/app/frames
- ./object_recognition:/app
- ./AImodels/object_recognition/model:/app/model
- ./AImodels/object_recognition/tmp:/app/tmp
environment:
- CAMERA_SERVICE_URL=http://camera_ctrl:5000
- API_SERVICE_URL=http://backend:5000
- TOKEN=hf_xxxxxx
- DATASETNAME=danlee01633060/imgtest
privileged: true
# deploy:
# resources:
# reservations:
# devices:
# - driver: nvidia
# count: 1
# capabilities: [ gpu ]
command: sh -c "sleep 30666"
# command: python appv2.py`
networks:
- service-networks
networks:
service-networks:
driver: bridge