A tool to deploy a mostly serverless MLflow on a GCP project with one command
- A GCP project on which you are owner
- Terraform, make, and jq installed
- Initialized gcloud SDK with your owner account
Clone the repo
Run make one-click-mlflow
and let the wizard guide you.
If you want to see the innards, you can run it in debug mode: DEBUG=true make one-click-mlflow
- Enables the necessary services
- Builds and deploys the MLFlow docker image
- Creates a private IP CloudSQL (MySQL) database for the tracking server
- Creates an AppEngine Flex on the default service for the web UI, secured by IAP
- Manages all the network magic
- Creates the
mlflow-log-pusher
service account
make deploy
: builds and pushes the application image and (re)deploys the infrastructuremake docker
: builds and pushes the application imagemake apply
: (re)deploys the infrastructuremake destroy
: destroys the infrastructure. Will not delete the OAuth consent screen, and the app engine application.
Once the deployment successful, you can start pushing to your MLFlow instance.
cd examples
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python track_experiment.py
You can than adapt examples/track_experiment.py
and examples/mlflow_config.py
to suit your application's needs.