Skip to content

Latest commit

 

History

History
57 lines (39 loc) · 1.26 KB

README.md

File metadata and controls

57 lines (39 loc) · 1.26 KB

MLflow Production Docker

A production ready1 docker-compose deployment of MLflow using Traefik with HTTP Basic Auth.

1 This project is provided as is, and without a warranty of any kind, see LICENSE for full details.

Setup

Install requirements:

  • Apache Utils (provides htpasswd command)
  • GNU gettext (provides envsubst command)
sudo apt-get install -y apache2-utils gettext

Create a new .htpasswd file with a single user (using Bcrypt hashing):

htpasswd -cB config/.htpasswd <username>

Add additional users with:

htpasswd -B config/.htpasswd <other_username>

Create a .env in the root directory with the following variables completed:

# connection settings
DOMAIN_NAME=localhost
SERVICE_NAME=mlflow
SERVICE_PORT=5000
# tell the user where they are logging into
REALM=testsite
# required for letsencrypt certificate email updates
[email protected]

Finally write a traefik.yml config file using the .env variables:

./write_template.sh

Running

Start all containers:

docker-compose up -d --build

MLflow is accessible on port 443 over HTTPS (port 80 redirects to 443). Use the username and password you created above to log in.