-
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
217 lines (202 loc) · 6.33 KB
/
Copy pathdocker-compose.yaml
File metadata and controls
217 lines (202 loc) · 6.33 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
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
services:
database:
image: "openml/test-database:v0.1.20260204"
container_name: "openml-test-database"
environment:
MYSQL_ROOT_PASSWORD: ok
ports:
- "3306:3306"
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
start_period: 30s
start_interval: 1s
timeout: 3s
interval: 5s
retries: 10
database-setup:
image: mysql
container_name: "openml-test-database-setup"
volumes:
- ./config/database/update.sh:/database-update.sh
command: /bin/sh -c "/database-update.sh"
depends_on:
database:
condition: service_healthy
elasticsearch:
profiles: ["all", "minio", "rest-api", "frontend", "elasticsearch", "evaluation-engine"]
image: docker.elastic.co/elasticsearch/elasticsearch:6.8.23 # This version is not available on arm. Newer version do not play well with the PHP code. See https://github.com/openml/OpenML/tree/feature/elasticsearch8
container_name: "openml-elasticsearch"
platform: "linux/amd64"
ports:
- "9200:9200" # also known as /es (nginx)
- "9300:9300"
env_file: config/elasticsearch/.env
healthcheck:
test: curl 127.0.0.1:9200/_cluster/health | grep -e "green"
start_period: 30s
start_interval: 5s
timeout: 3s
interval: 10s
deploy:
resources:
limits:
cpus: '1'
memory: 1G
reservations:
cpus: '0.2'
memory: 250M
nginx:
profiles: ["all", "minio", "rest-api", "frontend", "elasticsearch", "evaluation-engine"]
build:
context: config/nginx
container_name: openml-nginx
ports:
- "8000:8000"
networks:
default:
ipv4_address: 172.28.0.2
php-api:
profiles: ["all", "minio", "rest-api", "frontend", "evaluation-engine"]
image: openml/php-rest-api:v1.2.4
container_name: "openml-php-rest-api"
ports:
- "8080:80" # also known as /api (nginx)
env_file: config/php/.env
depends_on:
elasticsearch:
condition: service_healthy
database-setup:
condition: service_completed_successfully
volumes:
- ${PHP_CODE_DIR:-./config/emptydir}:${PHP_CODE_VAR_WWW_OPENML:-/tmp/unused}
- ./logs/php:/var/www/openml/logs
- ./data/php:/var/www/data
healthcheck:
test: curl 127.0.0.1:80/api/v1/json/data/1 | grep -e "data_set_description"
start_period: 2m
start_interval: 5s
timeout: 3s
interval: 1m
extra_hosts:
- "localhost=172.28.0.2"
# The Python based REST API is set to replace the PHP based REST API
# The 'light' profile can be used to test most of the REST API
# (everything except file uploads/downloads), but is
# faster to start and requires fewer resources to run.
python-api-light:
# if no profile is set below, it starts on all `compose up` invocations,
# which leads to port conflict if `python-api` is also started.
profiles: ["rest-api-light"]
image: openml/rest-api:0.0.1-alpha
container_name: "openml-python-rest-api-light"
ports:
- "8082:8000" # or localhost:8000/py with nginx
depends_on:
database-setup:
condition: service_completed_successfully
volumes:
- ./config/python-server/config.toml:/python-api/src/config.toml
healthcheck:
test: curl 127.0.0.1:8000/datasets/1 | grep -e "anneal"
start_period: 1m
start_interval: 5s
timeout: 3s
interval: 1m
python-api:
profiles: ["all", "rest-api"]
container_name: "openml-python-rest-api"
extends: python-api-light
depends_on:
database-setup:
condition: service_completed_successfully
php-api:
condition: service_healthy # used for serving arff files
minio:
condition: service_started # used for serving parquet files
nginx:
condition: service_started # used for routing to MinIO and PHP REST API
email-server:
profiles: ["all", "frontend"]
image: foxcpp/maddy:latest
container_name: "email-server"
platform: "linux/amd64"
ports:
- "25:25"
- "143:143"
- "587:587"
- "993:993"
env_file: config/email-server/.env
volumes:
- ./config/email-server/:/data
frontend:
profiles: ["all", "frontend"]
image: openml/frontend:v2.1.1
container_name: "openml-frontend"
ports:
- "8081:5000" # also known as / (nginx)
env_file: config/frontend/.env
volumes:
- ${FRONTEND_CODE_DIR:-./config/emptydir}:${FRONTEND_APP:-/tmp/unused}
depends_on:
php-api:
condition: service_healthy
minio:
profiles: ["all", "minio", "rest-api", "evaluation-engine"]
image: openml/test-minio:v0.1.20260204
container_name: "openml-minio"
ports:
- "9000:9000" # also known as /data (nginx)
- "9001:9001"
env_file: config/minio/.env
command: >
server /export --console-address ":9001"
arff-to-pq:
profiles: ["all", "minio"]
build:
context: config/arff-to-pq-converter
image: openml-arff-to-pq-converter-cron
container_name: "openml-arff-to-pq-converter"
env_file: config/arff-to-pq-converter/.env
entrypoint: >
/bin/bash -c "/run-cron.sh"
volumes:
- ${ARFF_TO_PQ_CODE_DIR:-./config/emptydir}:${ARFF_TO_PQ_APP:-/tmp/unused}
- ./logs/arff-to-pq-converter:/home/unprivileged-user/logs
- ./config/arff-to-pq-converter/config:/home/unprivileged-user/.config/openml/config:ro
depends_on:
php-api:
condition: service_healthy
extra_hosts:
- "localhost=172.28.0.2"
croissants:
profiles: ["all"]
image: "openml/croissant-converter:v1.4.2"
container_name: "openml-croissant-converter"
env_file: config/croissant-converter/.env
ports:
- "8001:8001"
command: >
web_api.py --host "0.0.0.0" --port 8001
evaluation-engine:
profiles: ["all", "evaluation-engine"]
build:
context: config/evaluation-engine
container_name: openml-evaluation-engine
entrypoint: >
sh /run-cron.sh
env_file: config/evaluation-engine/.env
volumes:
- ./logs/evaluation-engine:/logs
depends_on:
php-api:
condition: service_healthy
extra_hosts:
- "localhost=172.28.0.2"
networks:
default:
name: openml-services
ipam:
driver: default
config:
- subnet: 172.28.0.0/16
ip_range: 172.28.1.0/24