Coder Social home page Coder Social logo

pirocheto / docker-mlflow-basic-auth Goto Github PK

View Code? Open in Web Editor NEW
1.0 0.0 0.0 20 KB

Start an MLflow tracking server including basic authentication with docker

License: MIT License

Dockerfile 75.15% Shell 24.85%
docker docker-compose experiment-tracker mlflow mlflow-server mlops basic-auth minio mlflow-tracking-server nginx

docker-mlflow-basic-auth's Introduction

MLflow server with basic authentication

docker-badge mlflow-badge nginx-badge postgresql-badge minio-badge

NOTE: This project is not intended to be used for production deployments. It is intended to be used for testing and development.

Getting Started

Prerequisites

You must have docker and docker compose installed on your machine. You can check this with the commands below.

  • For docker:

    docker --version
  • For docker compose:

    docker compose --version

If you need, the easiest way to get them is to install Docker Desktop. You can find installation instructions here.

Usage

  1. Clone the repository

    git clone https://github.com/pirocheto/docker-mlflow
  2. Go to the folder

    cd docker-mlflow
  3. Start the services with docker compose

    docker compose up

NOTE

You now need to set up some additional environment variables to log into your mlflow server.

import os

os.environ["MLFLOW_TRACKING_USERNAME"] = "<<YOUR-MLFLOW-USERNAME>>"
os.environ["MLFLOW_TRACKING_PASSWORD"] = "<<YOUR-MLFLOW-PASSWORD>>"

You can also set up at the session level:

  • on linux/macOS:

    export MLFLOW_TRACKING_USERNAME="<<YOUR-MLFLOW-USERNAME>>"
    export MLFLOW_TRACKING_PASSWORD="<<YOUR-MLFLOW-PASSWORD>>"
  • on windows:

    $Env:MLFLOW_TRACKING_USERNAME = "<<YOUR-MLFLOW-USERNAME>>"
    $Env:MLFLOW_TRACKING_PASSWORD = "<<YOUR-MLFLOW-PASSWORD>>"

Configuration

You can change the username and password used to login in the docker-compose file.

name description default value
BASIC_USERNAME username used to login mlflow
BASIC_PASSWORD password used to login mlflow

Documentation

The docker-compose file is used to set up scenario 5 from the mlflow documentation as shown below.

scenario

source: https://mlflow.org/docs/latest/tracking.html#scenario-5-mlflow-tracking-server-enabled-with-proxied-artifact-storage-access

Note that there are two big differences:

  • An Nginx service is added to enable HTTP basic authentication.
  • The S3 service is replaced by minio to be able to start all the services locally.

License

Distributed under the MIT License. See LICENSE for more information.

References

badge-love

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.