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-utils
sudo apt-get install apache2-utils
-
Create at least one user
sudo htpasswd ./.htpasswd user1
-
Build
docker-compose build
-
Run. Use
-d
for detached mode (the terminal is not blocked)docker-compose up [-d]
-
Install
mlflow
pip 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
.env
file without the export command and use thedotenv
package to load it (pip install python-dotenv
).-
Install required library
pip install python-dotenv
-
.env
file# Login information MLFLOW_TRACKING_USERNAME=fill # Username MLFLOW_TRACKING_PASSWORD=fill # Password # Server information MLFLOW_TRACKING_URI=fill # Password
-
Python code to load the
.env
filefrom 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'])