Giter Club home page Giter Club logo

mlflow-docker-compose's Introduction

mlflow-docker-compose

Deploy mlflow with docker-compose

Deploy

1. Login Google Cloud Platform

In this script, mlflow stores artifacts on Google Cloud Storage.
It means you must set up GCP Credentials.
If you already have application_default_credentials.json, go next chapter.

$ gcloud auth application-default login

application_default_credentials.json will be saved ${HOME}/.config/gcloud/

2. Create .env file

In docker-composa.yaml, some parameters is loaded from .env file.
Set following parameters in .env.

  • HOST: host name(If you don't use domain, any name is accepted. If use, speciy it)
  • POSTGRES_USER: postgresql db user
  • POSTGRES_PASSWORD: postgresql db user password
  • GCP_STORAGE_BUCKET: Google Cloud Storage bucket name mlflow will store artifact
  • CREDENTIALS_PATH: Path to application_default_credentials.json
  • GCLOUD_PROJECT: GCP Project name you use
HOST=mlflow.dev
POSTGRES_USER=demo-user
POSTGRES_PASSWORD=demo-password
GCP_STORAGE_BUCKET=demo-bucket
CREDENTIALS_PATH=~/.config/gcloud/application_default_credentials.json
GCLOUD_PROJECT=demo-project

3. Set up NGINX Basic Authentication

Because mlflow doesn't provide authentication, use NGINX proxy for basic authentication system.

$ sudo echo "{USER_NAME}:$(openssl passwd -apr1 {PASSWORD})" >> ${HOST}

${HOST} is host name you set in chapter 2.

4. Build and deploy

Build mlflow Dockerfilw, and then deploy applications.

$ sudo docker-compose build
$ sudo docker-compose up -d

Client

To use Basic authentication, mlflow use following parameters passing HTTP authentication.
Set following environment parameters in local, same as 3. Set up NGINX Basic Authentication

  • MLFLOW_TRACKING_USERNAME
  • MLFLOW_TRACKING_PASSWORD

See also https://www.mlflow.org/docs/latest/tracking.html#logging-to-a-tracking-server

Update MLflow version

If you want update MLflow, stop container and remove images, and then rebuild MLflow container.

$ sudo docker-compose stop mlflow && \
  sudo docker-compose rm mlflow && \
  docker images mlflow-docker-compose_mlflow --format '{{.ID}}'|xargs docker rmi && \
  sudo docker-compose build && \
  sudo docker-compose up -d

On-Premises version

In case you'd like to run MLflow on your on-premises server, on_premises folder is for you. Batteries (sample setting files) included.

mlflow-docker-compose's People

Contributors

ymym3412 avatar daisukelab avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.