-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
81 lines (75 loc) · 1.71 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
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
version: '3.8'
services:
rabbitmq:
image: "rabbitmq:management"
healthcheck:
test: [ "CMD", "rabbitmqctl", "status" ]
interval: 10s
timeout: 5s
retries: 5
restart: always
ports:
- "15672:15672"
- "5672:5672"
env_file:
- .env
postgres:
image: postgres:latest
healthcheck:
test: [ "CMD-SHELL", "/usr/local/bin/pg_healthcheck.sh"]
interval: 10s
timeout: 5s
retries: 5
restart: always
ports:
- "5432:5432"
volumes:
- ${POSTGRES_DIR}:/var/lib/postgresql/data
- ./pg_healthcheck.sh:/usr/local/bin/pg_healthcheck.sh
env_file:
- .env
control_api:
build: ./src/controlservice
ports:
- "16666:8000"
command: uvicorn main:app --host 0.0.0.0 --reload
volumes:
- ${VIDEO_DIR}:/media/train_videos/
- ${DATA_DIR}:/data
depends_on:
rabbitmq:
condition: service_healthy
postgres:
condition: service_healthy
env_file:
- .env
restart: always
training_worker:
build: ./src/trainingservice
command: python3 training_worker.py
runtime: nvidia
volumes:
- ${DATA_DIR}:/data
- ${VIDEO_DIR}:/media/train_videos/
depends_on:
rabbitmq:
condition: service_healthy
postgres:
condition: service_healthy
env_file:
- .env
restart: always
dataset_worker:
build: ./src/datasetservice
command: python dataset_worker.py
volumes:
- ${DATA_DIR}:/data
- ${VIDEO_DIR}:/media/train_videos/
depends_on:
rabbitmq:
condition: service_healthy
postgres:
condition: service_healthy
env_file:
- .env
restart: always