{"id":23955586,"url":"https://github.com/tnwei/mlflow-docker","last_synced_at":"2026-05-01T21:03:46.588Z","repository":{"id":129158806,"uuid":"415081208","full_name":"tnwei/mlflow-docker","owner":"tnwei","description":"Plug and play MLflow experiment tracking with Minio artifact store","archived":false,"fork":false,"pushed_at":"2021-10-09T05:44:49.000Z","size":7,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-24T10:27:59.574Z","etag":null,"topics":["data-science","docker","docker-compose","experiment-tracking","mlflow","mlflow-tracking"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tnwei.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-10-08T17:57:49.000Z","updated_at":"2023-02-06T15:44:19.000Z","dependencies_parsed_at":"2023-07-27T04:30:57.063Z","dependency_job_id":null,"html_url":"https://github.com/tnwei/mlflow-docker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tnwei/mlflow-docker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tnwei%2Fmlflow-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tnwei%2Fmlflow-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tnwei%2Fmlflow-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tnwei%2Fmlflow-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tnwei","download_url":"https://codeload.github.com/tnwei/mlflow-docker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tnwei%2Fmlflow-docker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32512670,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-science","docker","docker-compose","experiment-tracking","mlflow","mlflow-tracking"],"created_at":"2025-01-06T15:36:16.972Z","updated_at":"2026-05-01T21:03:46.570Z","avatar_url":"https://github.com/tnwei.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mlflow-docker\n\nThis repo configures an MLflow tracking server + Minio artifact store as Docker containers, organized with `docker-compose`. \n\n## Motivation\n\nSelf-hosted experiment tracking that is quick to set up, and can be rolled out consistently over multiple projects. Serves as an on-prem alternative to services like Weights \u0026 Biases or Comet.ml.\n\n## Setup\n\n1. `git clone` this repo. I personally clone directly into existing ML project repos for project-specific use.\n2. `cd` into `mlflow-docker`, and change environment variables in `.env` as required. Then run `docker-compose up -d`.\n3. Access the Minio console (defaults to `http://localhost:3002`) and create the storage bucket with the name specified in `.env` (defaults to `my-mlflow-bucket`).\n4. Configure local MLflow to have the same env vars in the bottom section of `.env`\n5. Run the test script from your local setup and verify your installation is working.\n6. Enjoy! \n\n## Architecture\n\n`docker-compose.yml` defines the following services:\n\n+ `mlflow`: houses the MLflow tracking server, dashboard accessible from `http://localhost:3000`.\n+ `minio`: houses the Minio object store, API exposed at `http://localhost:3001`. User console accessible from `http://localhost:3002`.\n+ `postgres`: stores data for the MLflow tracking server\n\nWhen run, the services will create folders `minio-data/` and `mlflow-data/`. \n\n## Notes\n\n**Credentials and version control**: The `.env` file provided is committed to git since the credentials within are safe to expose within the context of local usage. If you are hosting on cloud, please remember to NOT commit changes to `.env` to version control.\n\n**Multiple users**: If shared between multiple users, it would be prudent to create individual key-secret pairs for each user from the Minio console. Probably also want to consider adding `nginx` for load balancing.\n\n**Project isolation**: Container data is mounted locally on disk to save hassle. If they are mounted as Docker volumes instead, tracking multiple projects would warrant unique volume names for each project. \n\n**Why local MLflow needs setting up env vars**: Local MLflow needs to have env vars to access the Minio server, because artifacts are logged directly to the artifact store instead of through the tracking server. The MLflow devs are working on logging artifacts directly through the tracking server, progress tracked in [this PR](https://github.com/mlflow/mlflow/issues/629).\n\n## Example: Using MLflow in Python\n\n``` python\n# Setup env vars for MLflow\n# These are the defaults specified in `.env`\nimport os\nos.environ[\"AWS_SECRET_ACCESS_KEY\"] = \"minioadmin\"\nos.environ[\"AWS_ACCESS_KEY_ID\"] = \"minioadmin\"\nos.environ[\"MLFLOW_S3_ENDPOINT_URL\"] = \"http://localhost:3001\"\nos.environ[\"MLFLOW_S3_IGNORE_TLS\"] = \"true\"\n\n# Setup MLflow\nimport mlflow\nmlflow.set_tracking_uri(\"http://localhost:3000\") # MLflow tracking server exposed on port 3000 by default\nmlflow.set_experiment(\"experiment-name\")\nmlflow.start_run()\n\n# Log params\nmlflow.log_params({\n    \"lr\": 5e-4\"\n})\n\n# Log figure\nmlflow.log_figure(fig, \"figure.png\")\n\n# Log metric\nmlflow.log_metric(\"loss/train\", loss.sum(), step=step)\n\n# Log metrics\nmlflow.log_metrics({\n    \"acc/train/0\": acc[0].item(),\n    \"acc/train/1\": acc[1].item()\n}, step=step)\n\n# End run\nmlflow.end_run()\n```\n\n## Useful links\n\n+ [About MLflow Tracking](https://www.mlflow.org/docs/latest/tracking.html)\n+ [Minio Quickstart on Docker](https://docs.min.io/docs/minio-docker-quickstart-guide.html)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftnwei%2Fmlflow-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftnwei%2Fmlflow-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftnwei%2Fmlflow-docker/lists"}