-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
102 lines (99 loc) · 2.6 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
version: "3.7"
services:
s3:
image: minio/minio
container_name: s3
volumes:
- ./buckets:/data:consistent
expose:
- "9000"
ports:
- "9000:9000"
environment:
- MINIO_ACCESS_KEY=${MINIO_ACCESS_KEY}
- MINIO_SECRET_KEY=${MINIO_SECRET_KEY}
command: minio server /data
networks:
- mlflow
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
createbuckets:
image: minio/mc
depends_on:
- s3
networks:
- mlflow
entrypoint: >
/bin/sh -c "
/usr/bin/mc config host add myminio http://s3:9000 ${MINIO_ACCESS_KEY} ${MINIO_SECRET_KEY};
/usr/bin/mc rm -r --force myminio/mlflow;
/usr/bin/mc mb myminio/mlflow;
/usr/bin/mc policy set download myminio/mlflow;
exit 0;
"
db:
image: mysql
container_name: db
command: --innodb_use_native_aio=0
networks:
- mlflow
ports:
- "3306:3306"
environment:
- MYSQL_DATABASE=${MYSQL_DATABASE}
- MYSQL_USER=${MYSQL_USER}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
# volumes:
# - ./dbdata:/var/lib/mysql
mlflow:
restart: always
build: .
image: mlflow_server
container_name: mlflow_server
ports:
- "5000:5000"
networks:
- mlflow
environment:
- MLFLOW_S3_ENDPOINT_URL=http://s3:9000
- AWS_ACCESS_KEY_ID=${MINIO_ACCESS_KEY}
- AWS_SECRET_ACCESS_KEY=${MINIO_SECRET_KEY}
command: mlflow server --backend-store-uri mysql+pymysql://${MYSQL_USER}:${MYSQL_PASSWORD}@db:3306/${MYSQL_DATABASE} --default-artifact-root s3://mlflow/ --host 0.0.0.0
depends_on:
- db
zookeeper:
image: confluentinc/cp-zookeeper
hostname: zookeeper
container_name: zookeeper
ports:
- "2181:2181"
networks:
- kafka
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
kafka:
image: confluentinc/cp-kafka
hostname: kafka
container_name: kafka
networks:
- kafka
ports:
- "19092:19092"
depends_on:
- zookeeper
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092,CONNECTIONS_FROM_HOST://localhost:19092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,CONNECTIONS_FROM_HOST:PLAINTEXT
KAFKA_CREATE_TOPICS: "test:1:1"
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_ADVERTISED_HOST_NAME: kafka
networks:
mlflow: {}
kafka: {}