-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
185 lines (175 loc) · 5.09 KB
/
docker-compose.yaml
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
version: '3.4'
services:
custom-dataset-srv:
image: "ghcr.io/axinc-ai/ailia-trainer-custom-dataset-srv:latest"
ports:
- 19999:19999/tcp
user: 999:999 # same as trainer
volumes:
- type: volume
source: ailia-trainer-data
target: /trainer_data
read_only: false
volume:
nocopy: true
command:
- ./dataset-curation
- server
- --listen-addr
- ":19999"
- --work-dir
- /trainer_data/customDataset
- --upstream-addr
- http://trainer-yolox:8081
- --annotation-addr
- http://annotate-dataset-srv:19990
networks:
- ailia-trainer
hostname: custom-dataset-srv
custom-dataset-srv-yolov4:
image: "ghcr.io/axinc-ai/ailia-trainer-custom-dataset-srv-yolov4:latest"
ports:
- 19998:19999/tcp
user: 999:999 # same as trainer
volumes:
- type: volume
source: ailia-trainer-data
target: /trainer_data
read_only: false
volume:
nocopy: true
command:
- ./dataset-curation
- server
- --listen-addr
- ":19999"
- --work-dir
- /trainer_data/customDataset
- --upstream-addr
- http://trainer-yolov4:8080
- --annotation-addr
- http://annotate-dataset-srv:19990
networks:
- ailia-trainer
hostname: custom-dataset-srv
annotate-dataset-srv:
image: "ghcr.io/axinc-ai/ailia-trainer-annotate-dataset-srv:latest"
user: 999:999 # same as trainer
shm_size: '2gb'
volumes:
- type: volume
source: ailia-trainer-data
target: /trainer_data
read_only: false
volume:
nocopy: true
- type: bind
source: weights/Detic_LCOCOI21k_CLIP_SwinB_896b32_4x_ft4x_max-size.pth
target: /app/backend/models/Detic_LCOCOI21k_CLIP_SwinB_896b32_4x_ft4x_max-size.pth
read_only: true
- type: bind
source: weights/ViT-B-32.pt
target: /home/trainer/.cache/clip/ViT-B-32.pt
read_only: true
environment:
- PORT=19990
- CUSTOM_DATASET_STORAGE=/trainer_data/customDataset
- GUNICORN_THREADS=1
- GUNICORN_WORKERS=1
# - FORCE_CPU=1
networks:
- ailia-trainer
hostname: annotate-dataset-srv
deploy:
resources:
limits:
cpus: '6'
# memory: 6G # If GPU is used, need at least 6GB
reservations:
cpus: '6'
# memory: 6G
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
trainer-yolov4:
image: "ghcr.io/axinc-ai/ailia-trainer-trainer-yolov4:latest"
shm_size: '2gb'
volumes:
- type: volume
source: ailia-trainer-data
target: /trainer_data
read_only: false
volume:
nocopy: true
- type: bind
source: weights
target: /weights
read_only: true
environment:
# /!\ If you are running the training atop wsl2, you should
# uncomment this line below to avoid network problem when
# downloading an oid dataset.
#- USE_WSL2=1
- PORT=8080
- TRAINER_PATH=/app
- TRAINING_PRETRAINED=/weights/yolov4.conv.137.pth
- TRAINING_DEST=/trainer_data/training
- CUSTOM_DATASET_STORAGE=/trainer_data/customDataset
- CUSTOM_DATASET_ENDPOINT=http://custom-dataset-srv:19999/custom_dataset/
- DISK_USAGE_MONITOR_PATH=/
# cf https://stackoverflow.com/questions/73747731/runtimeerror-cuda-out-of-memory-how-can-i-set-max-split-size-mb
- PYTORCH_CUDA_ALLOC_CONF=max_split_size_mb:512
networks:
- ailia-trainer
hostname: trainer-yolov4
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
trainer-yolox:
image: "ghcr.io/axinc-ai/ailia-trainer-trainer-yolox:latest"
shm_size: '2gb'
volumes:
- type: volume
source: ailia-trainer-data
target: /trainer_data
read_only: false
volume:
nocopy: false
- type: bind
source: weights
target: /weights
read_only: true
environment:
# /!\ If you are running the training atop wsl2, you should
# uncomment this line below to avoid network problem when
# downloading an oid dataset.
#- USE_WSL2=1
- PORT=8081
- TRAINER_PATH=/app
- TRAINING_PRETRAINED=/weights/yolov4.conv.137.pth
- TRAINING_DEST=/trainer_data/training
- CUSTOM_DATASET_STORAGE=/trainer_data/customDataset
- CUSTOM_DATASET_ENDPOINT=http://custom-dataset-srv:19999/custom_dataset/
- DISK_USAGE_MONITOR_PATH=/
# cf https://stackoverflow.com/questions/73747731/runtimeerror-cuda-out-of-memory-how-can-i-set-max-split-size-mb
- PYTORCH_CUDA_ALLOC_CONF=max_split_size_mb:512
networks:
- ailia-trainer
hostname: trainer-yolox
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
networks:
ailia-trainer:
volumes:
ailia-trainer-data:
driver: local