Secure MLflow server setup for production
Secret Mananger
In Secret Manager you need to configure secrets that the mlflow
image will retrieve at boot time:
mlflow_artifact_url
- path to your Cloud Storage bucket, sample valuegs://mlflow
mlflow_database_url
- SQLAlchemy-format Cloud SQL connection string (over internal GCP interfaces, not through IP), sample valuepostgresql+pg8000://<dbuser>:<dbpass>@/<dbname>?unix_sock=/cloudsql/dlabs:europe-west3:mlfow/.s.PGSQL.5432
, the Cloud SQL instance name can be copied from Cloud SQL instance overview pagemlflow_tracking_username
- the basic HTTP auth username formlflow
, your choice, sample valuedlabs-developer
mlflow_tracking_password
- the basic HTTP auth password formlflow
, your choice
Usage
docker build . -t mlflow
docker run --envs GCP_PROJECT=gcp-project-id -p 8080:8080 mlflow