The default artifact storage is configured to use be the folder mlruns.
For the users' database, please create it following the instructions
here
or
here. Then put the generated .htpasswd file into the config/ folder.
In a nutshell
-
Install
apache2-utilssudo apt-get install apache2-utils
-
Create at least one user
sudo htpasswd ./.htpasswd user1
-
Build
docker-compose build
-
Run. Use
-dfor detached mode (the terminal is not blocked)docker-compose up [-d]
-
Install
mlflowpip install mlflow
-
Set environment variables:
Manually:
# Login information export MLFLOW_TRACKING_USERNAME=fill # Username export MLFLOW_TRACKING_PASSWORD=fill # Password # Server information export MLFLOW_TRACKING_URI=fill # Password
Or in Python. You can copy the previous code snippet into a
.envfile without the export command and use thedotenvpackage to load it (pip install python-dotenv).-
Install required library
pip install python-dotenv
-
.envfile# Login information MLFLOW_TRACKING_USERNAME=fill # Username MLFLOW_TRACKING_PASSWORD=fill # Password # Server information MLFLOW_TRACKING_URI=fill # Password
-
Python code to load the
.envfilefrom dotenv import load_dotenv load_dotenv(dotenv_path='./.env')
-
-
Set the tracking URL
import mlflow import os mlflow.set_tracking_uri(os.environ['MLFLOW_TRACKING_URI'])