-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
317 lines (298 loc) · 7.65 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
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
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
version: "3.9" # optional since v1.27.0
services:
builder:
container_name: bob
build:
context: ./
dockerfile: builder/Dockerfile
volumes:
- ./builder:/source
- ./shared:/shared
downloader:
container_name: downloader
profiles: ["downloader"]
build:
context: ./
dockerfile: downloader/Dockerfile
volumes:
- ./shared:/shared
- ./downloader:/source
# services which have downloads.toml at the moment
- ./offline:/offline
- ./llm_functionalities:/llm_functionalities
- ./neural_functionalities:/neural_functionalities
- ./functionalities:/functionalities
- ./training:/training
environment:
- CONTAINER_NAME=downloader
depends_on:
- builder
- oat_common
networks:
- internal
- external
local_client:
container_name: local_client
build:
context: ./
dockerfile: local_client/Dockerfile
ports:
- "9000:8000"
volumes:
- ./local_client:/source
- ./shared:/shared
environment:
- CONTAINER_NAME=local_client
- DISTRIBUTOR_URL=http://orchestrator:8000
networks:
- internal
- external
depends_on:
- builder
- oat_common
oat_common:
container_name: oat_common
build:
context: ./
dockerfile: oat_common/Dockerfile
image: oat_common
orchestrator:
container_name: orchestrator
build:
context: ./
dockerfile: orchestrator/Dockerfile
volumes:
- ./orchestrator:/source
- ./shared:/shared
environment:
- CONTAINER_NAME=orchestrator
- FUNCTIONALITIES_URL=functionalities:8000
- EXTERNAL_FUNCTIONALITIES_URL=external_functionalities:8000
- NEURAL_FUNCTIONALITIES_URL=neural_functionalities:8000
- LLM_FUNCTIONALITIES_URL=llm_functionalities:8000
networks:
- internal
depends_on:
- builder
- oat_common
- functionalities
- external_functionalities
- neural_functionalities
functionalities:
container_name: functionalities
build:
context: ./
dockerfile: functionalities/Dockerfile
volumes:
- ./functionalities:/source
- ./shared:/shared
environment:
- CONTAINER_NAME=functionalities
- EXTERNAL_FUNCTIONALITIES_URL=external_functionalities:8000
- FUNCTIONALITIES_URL=functionalities:8000
- NEURAL_FUNCTIONALITIES_URL=neural_functionalities:8000
- LLM_FUNCTIONALITIES_URL=llm_functionalities:8000
networks:
- internal
- external
depends_on:
- builder
- oat_common
external_functionalities:
container_name: external_functionalities
build:
context: ./
dockerfile: external_functionalities/Dockerfile
volumes:
- ./external_functionalities:/source
- ./shared:/shared
environment:
- CONTAINER_NAME=external_functionalities
- DATABASE_URL=http://dynamodb-local:8000
- FUNCTIONALITIES_URL=functionalities:8000
networks:
- internal
- external
depends_on:
- builder
- oat_common
- dynamodb-local
neural_functionalities:
container_name: neural_functionalities
build:
context: ./
dockerfile: neural_functionalities/Dockerfile
volumes:
- ./neural_functionalities:/source
- ./shared:/shared
environment:
- CONTAINER_NAME=neural_functionalities
- NEURAL_FUNCTIONALITIES_URL=neural_functionalities:8000
- FUNCTIONALITIES_URL=functionalities:8000
- EXTERNAL_FUNCTIONALITIES_URL=external_functionalities:8000
networks:
- internal
- external
depends_on:
builder:
condition: service_started
oat_common:
condition: service_started
dynamodb-local:
container_name: dynamodb-local
image: "amazon/dynamodb-local:latest"
ports:
- "8888:8000"
volumes:
- "./shared/file_system/dynamodb:/home/dynamodblocal/data"
working_dir: /home/dynamodblocal
command: "-jar DynamoDBLocal.jar -sharedDb -dbPath ./data"
user: root
networks:
- internal
- external
dashboard:
container_name: dashboard
profiles: ["dashboard"]
build:
context: ./
dockerfile: dashboard/Dockerfile
ports:
- "7500:7500"
volumes:
- ./dashboard:/source
- ./shared:/shared
environment:
- CONTAINER_NAME=dashboard
- DB_ENVIRONMENT=Undefined
- DATABASE_URL=http://dynamodb-local:8000
networks:
- internal
- external
depends_on:
- builder
- dynamodb-local
- oat_common
tester:
container_name: tester
profiles: ["tester"]
build:
context: ./
dockerfile: tester/Dockerfile
volumes:
- ./tester:/source
- ./shared:/shared
environment:
- CONTAINER_NAME=tester
- FUNCTIONALITIES_URL=functionalities:8000
- EXTERNAL_FUNCTIONALITIES_URL=external_functionalities:8000
- NEURAL_FUNCTIONALITIES_URL=neural_functionalities:8000
- DISTRIBUTOR_URL=http://orchestrator:8000
networks:
- external
- internal
depends_on:
- builder
- oat_common
offline:
container_name: offline
profiles: ["offline"]
build:
context: ./
dockerfile: offline/Dockerfile
volumes:
- ./offline:/source
- ./shared:/shared
- ./testing/integration_tests:/integration_tests
environment:
- CONTAINER_NAME=offline
- FUNCTIONALITIES_URL=functionalities:8000
networks:
- internal
- external
depends_on:
- builder
- oat_common
- dynamodb-local
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
sphinx_docs:
container_name: sphinx_docs
profiles: ["sphinx_docs"]
build:
context: ./
dockerfile: sphinx_docs/Dockerfile
volumes:
# this is a bit different from the other containers in that it mounts
# the entire OAT folder at /source. this allows Sphinx to have
# access to the entire codebase instead of a subfolder
- ./:/source
# shared is accessible through the /source mount, but to make the paths
# work as expected mount it separately too
- ./shared:/shared
environment:
- CONTAINER_NAME=sphinx_docs
depends_on:
- builder
training:
container_name: training
profiles: ["training"]
build:
context: ./
dockerfile: training/Dockerfile
volumes:
- ./training:/source
- ./shared:/shared
environment:
- CONTAINER_NAME=training
networks:
- internal
- external
depends_on:
- builder
- oat_common
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
llm_functionalities:
container_name: llm_functionalities
build:
context: ./
dockerfile: llm_functionalities/Dockerfile
volumes:
- ./llm_functionalities:/source
- ./shared:/shared
environment:
- CONTAINER_NAME=llm_functionalities
- NEURAL_FUNCTIONALITIES_URL=llm_functionalities:8000
- FUNCTIONALITIES_URL=functionalities:8000
- EXTERNAL_FUNCTIONALITIES_URL=external_functionalities:8000
networks:
- internal
- external
depends_on:
builder:
condition: service_started
oat_common:
condition: service_started
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [ gpu ]
networks:
internal:
internal: true
external:
internal: false