Skip to content

Latest commit

 

History

History
88 lines (77 loc) · 2.58 KB

File metadata and controls

88 lines (77 loc) · 2.58 KB

Dockerized MLflow Tracking Server

The server uses two stores:

  1. Backend store for MLflow entities: runs, parameters, metrics, tags, notes, metadata, etc
  2. Artifact store for other ones: files, models, images, in-memory objects, or model summary, etc

The server can be deployed in one of several scenarios

See MLflow docs for actual information


Scenario 5 (with proxied access to artifact store)

How to run:

  1. Go to scenario directory
cd docker/scenario_5
  1. Copy and modify "dotenv" files from examples
cp .env.example .env
cp .env.secret.example .env.secret
  1. Generate password for username of nginx proxy (e.g. for username "user")
htpasswd -c .htpasswd user
  1. Run MLflow
docker compose up -d

If you need to make changes to docker-compose.yaml, it's convenient to copy docker-compose.yaml to docker-compose.override.yaml and make changes to it

  1. Check MLflow UI at
http://YOUR_HOST:5000
  1. To connect from code, set environment variables
MLFLOW_TRACKING_URI=http://YOUR_HOST:5000
MLFLOW_TRACKING_USERNAME=HTPASSWD_USERNAME
MLFLOW_TRACKING_PASSWORD=HTPASSWD_PASSWORD
  • Check MinIO UI
http://YOUR_HOST:9001

If you do not need MinIO UI, change ports "9001:9001" to expose "9001" at nginx_minio service

  • Check PostgreSQL via pgAdmin at
http://YOUR_HOST:5050

If you do not need pgAdmin, comment pgadmin service in docker-compose.yaml

How to test

  1. Install requirements.txt
pip install -r requirements.txt
  1. Go to test directory
cd tests/scenario_5
  1. Run test script
MLFLOW_TRACKING_URI=http://YOUR_HOST:5000 MLFLOW_TRACKING_USERNAME=HTPASSWD_USERNAME MLFLOW_TRACKING_PASSWORD=HTPASSWD_PASSWORD python test.py
  1. Check MLflow UI on new experiment and model at
http://YOUR_HOST:5000

Description

Selected stores:

  1. RDBMS PostgreSQL as Backend store
  2. S3 compatible MinIO as Artifact store

Containers used:

  1. Local image for MLflow
  2. postgres for PostgreSQL
  3. minio for MinIO
  4. minio/mc for MinIO Client
  5. nginx for MinIO Nginx
  6. nginx for MLflow Nginx
  7. Optional pgadmin4 for pgAdmin

See docs for more information