My version of a basic portable tracking server setup with all amentities to track and store experiments and models. Depends on MLFlow server wired up to a basic postgres DB and a basic minio instance. Requires mounted volumes to persist the tracking information and models. Should be buildable and deployable anywhere. Big props for the straightforward, simple and clean solution done by Erik Dao.
- copy the
.env-templatefile or rename it to.env- set the right user names and pwds in the env vars - use discretion
- for more professional undertakings and / or corporate use, consider this
- replace
ml-flow-bucketwith your selected minio-Bucket identifier - replace / rewrite the volumes-section in the compose-file, see also the docs
- double check the docker-compose.yml s.t. every component has access to the relevant login/user information (else inspect the container logs)
- fire up the service:
docker-compose up -d --build
- The original docker-compose.yml settings from the original documentation on remote tracking / model artifact storage here are faulty - minio is not reachable if it gets referred to by
localhostin the container running the MLFlow server. This is explained in further detail here. - The version done by Erik Dao here is also faulty because of:
- a very small error in the minio setup script - the server needs to spool up before a bucket is created. This is not included in the original version and leads to bucket creation failure - I fixed it after reading this discussion
- the docker networking error (notwithstanding docker networking settings not shown) mentioned above
- small, but security-relevant: original docs use env-vars sometimes but also hard coding the Postgres-DB access data in the docker-compose.yml, this is now rewritten to purely env vars
- Model registry staging is being deprecated RFC:deprecating model registry stages in favor of model version tags and model version aliases as well as promoting the use of MLFlow Authentication for different enviroments for different scenarios (think: dev, staging, prod).