This repository contians a modified docker image of mlflow that works with external MySQL database and Object Storage (e.g. MinIO).
- Docker Installation
- GNU Make
Adjust the Makefile
to meet your need:
PERSISTENCE_DIR = $(shell pwd)/data
VERSION = 2.14.0
NAMESPACE = davidliyutong
IMAGE = mlflow
In the example above, the image will be built with tag
davidliyutong/mlflow:2.14.0
Execute make build
to build images
make build
Execute make push
to push images to registry.
make push
Install docker-compose:
pip install docker-compose
Modify the docker-compose.yaml
to meet your need:
version: "3"
services:
db:
image: mysql:5.7
restart: unless-stopped
container_name: db
expose:
- "3306"
volumes:
- db_data:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: mlflow
MYSQL_DATABASE: mlflowdb
MYSQL_USER: mlflow
MYSQL_PASSWORD: mlflow
mlflow:
image: davidliyutong/mlflow:latest
restart: unless-stopped
container_name: mlflow
ports:
- "5000:5000"
environment:
MYSQL_DATABASE: mlflowdb
MYSQL_USER: mlflow
MYSQL_PASSWORD: mlflow
MYSQL_HOST: db
MYSQL_PORT: 3306
MLFLOW_S3_ENDPOINT_URL: http://oss.example.com:9000
MLFLOW_S3_IGNORE_TLS: "true"
MLFLOW_S3_BUCKET: mlflow
AWS_ACCESS_KEY_ID: <your access key>
AWS_SECRET_ACCESS_KEY: <your secret key>
volumes:
db_data:
The provided access key should have write access to
MLFLOW_S3_BUCKET