NOTE: This project is not intended to be used for production deployments. It is intended to be used for testing and development.
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.
-
Clone the repository
git clone https://github.com/pirocheto/docker-mlflow
-
Go to the folder
cd docker-mlflow
-
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>>"
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 |
The docker-compose file is used to set up scenario 5 from the mlflow documentation as shown below.
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.
Distributed under the MIT License. See LICENSE for more information.
- docker: https://docs.docker.com/
- mlflow: https://mlflow.org/docs/latest/index.html
- minio: https://min.io/docs/minio/container/index.html
- postgresql: https://www.postgresql.org/docs/
- nginx: https://docs.nginx.com/