Skip to content

Instantly share code, notes, and snippets.

@harupy
Created September 5, 2023 07:20
Show Gist options
  • Save harupy/0ee67bb9d5a9902f70579f1ce6e8f469 to your computer and use it in GitHub Desktop.
Save harupy/0ee67bb9d5a9902f70579f1ce6e8f469 to your computer and use it in GitHub Desktop.
compose.yml
services:
mysql:
image: mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: root-password
MYSQL_DATABASE: mlflowdb
MYSQL_USER: mlflowuser
MYSQL_PASSWORD: mlflowpassword
command: mysqld --default-authentication-plugin=mysql_native_password
mlflow:
build:
context: .
depends_on:
- mysql
ports:
- 5000:5000
environment:
MLFLOW_TRACKING_URI: mysql://mlflowuser:mlflowpassword@mysql:3306/mlflowdb?charset=utf8mb4
command: [
"mlflow",
"server",
"--host",
"0.0.0.0",
"--port",
"5000",
"--backend-store-uri",
"mysql://mlflowuser:mlflowpassword@mysql:3306/mlflowdb?charset=utf8mb4",
"--default-artifact-root",
"./mlruns"
]
@harupy
Copy link
Author

harupy commented Sep 5, 2023

# Dockerfile

FROM python:3.8

RUN pip install PyMySQL mysqlclient mlflow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment