-
Notifications
You must be signed in to change notification settings - Fork 54
/
Copy pathdocker-compose.yaml
129 lines (118 loc) · 3.73 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
# Copyright 2021 The MLX Contributors
#
# SPDX-License-Identifier: Apache-2.0
version: '3.7'
# starts 4 Docker containers: Minio, MySQL, MLX-API, MLX-UI
# access the MLX API Spec at http://localhost:8080/apis/v1alpha1/ui/#!/
# access the MLX UI dashboard at http://localhost/
services:
minio:
image: minio/minio:RELEASE.2021-07-12T02-44-53Z
volumes:
- data-minio:/data
ports:
- "9000:9000"
- "9001:9001"
environment:
MINIO_ROOT_USER: "minio"
MINIO_ROOT_PASSWORD: "minio123"
command: server /data --console-address ":9001"
miniosetup:
image: minio/mc:RELEASE.2021-06-13T17-48-22Z
depends_on:
- minio
entrypoint: ["/bin/sh","-c"]
environment:
HEALTH_API: "http://minio:9000/minio/health/live"
command:
- |
until curl -I -s "$${HEALTH_API}" | grep -q "200 OK"; do
echo "Waiting for Minio at $${HEALTH_API}"
sleep 1
done
/usr/bin/mc config host add miniohost http://minio:9000 minio minio123
/usr/bin/mc mb -p miniohost/mlpipeline
/usr/bin/mc policy set download miniohost/mlpipeline
mysql:
image: mysql:5.7
platform: linux/amd64
command: --default-authentication-plugin=mysql_native_password
restart: always
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: "true"
MYSQL_DATABASE: "mlpipeline"
ports:
- "3306:3306"
volumes:
- data-mysql:/var/lib/mysql
mlx-api:
image: mlexchange/mlx-api:nightly-main
depends_on:
- miniosetup
- mysql
ports:
- "8080:8080"
environment:
MINIO_SERVICE_SERVICE_HOST: "minio"
MINIO_SERVICE_SERVICE_PORT: "9000"
MYSQL_SERVICE_HOST: "mysql"
MYSQL_SERVICE_PORT: "3306"
ML_PIPELINE_SERVICE_HOST: "UNAVAILABLE"
ML_PIPELINE_SERVICE_PORT: "UNAVAILABLE"
mlx-ui:
image: mlexchange/mlx-ui:nightly-origin-main
ports:
- "80:3000"
environment:
REACT_APP_BRAND: "Machine Learning Exchange"
REACT_APP_UPLOAD: "true"
REACT_APP_RUN: "false"
REACT_APP_BASE_PATH: ""
REACT_APP_API: "${DOCKER_HOST_IP:-localhost}:8080"
REACT_APP_KFP: ""
REACT_APP_DISABLE_LOGIN: "true"
REACT_APP_GTM_ID: "${GTM_ID}"
REACT_APP_TTL: "0"
REACT_APP_CACHE_INTERVAL: "0"
catalog:
image: curlimages/curl
depends_on:
- miniosetup
- mysql
- mlx-api
entrypoint: [ "/bin/sh", "-c" ]
environment:
HEALTH_API: "http://mlx-api:8080/apis/v1alpha1/health_check?check_database=true&check_object_store=true"
UPLOAD_API: "http://mlx-api:8080/apis/v1alpha1/catalog/upload_from_url"
CATALOG_URL: "https://raw.githubusercontent.com/machine-learning-exchange/mlx/main/bootstrapper/catalog_upload.json"
SETTINGS_API: "http://mlx-api:8080/apis/v1alpha1/settings"
command:
- |
until curl -I -s "$${HEALTH_API}" | grep -q "200 OK"; do
echo "Waiting for MLX API at $${HEALTH_API}"
sleep 3
done
curl -X POST \
-H "Content-Type: multipart/form-data" \
-F url="$${CATALOG_URL}" \
-s "$${UPLOAD_API}" | grep -iE "total_|error"
curl -X PUT \
-H 'Content-Type: application/json' \
-d '{"Execution enabled": false, "Inference Services": false}' \
-s "$${SETTINGS_API}" -o /dev/null --show-error
dashboard:
image: curlimages/curl
depends_on:
- mlx-ui
entrypoint: ["/bin/sh","-c"]
command:
- |
until curl -I -s "http://mlx-ui:3000" | grep -q "200 OK"; do sleep 5; done
echo
echo "================================================"
echo " Open the MLX Dashboard at http://${DOCKER_HOST_IP:-localhost}:80/ "
echo "================================================"
echo
volumes:
data-minio:
data-mysql: