{"id":43,"date":"2025-04-05T16:51:55","date_gmt":"2025-04-05T16:51:55","guid":{"rendered":"https:\/\/aiopsschool.com\/blog\/?p=43"},"modified":"2025-04-05T16:51:55","modified_gmt":"2025-04-05T16:51:55","slug":"mlflow-deployment-on-various-clouds-a-quick-overview","status":"publish","type":"post","link":"https:\/\/aiopsschool.com\/blog\/mlflow-deployment-on-various-clouds-a-quick-overview\/","title":{"rendered":"MLflow Deployment on Various Clouds: A Quick Overview"},"content":{"rendered":"\n<p>Great question! Deploying <strong>MLflow on various cloud platforms<\/strong> enables centralized tracking, model registry, and production-ready serving. Below is a <strong>complete guide<\/strong> on <strong>how to deploy MLflow<\/strong> on major cloud providers with options for both <strong>minimal<\/strong> and <strong>production-grade setups<\/strong>.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83c\udf10 <strong>MLflow Deployment on Various Clouds: A Quick Overview<\/strong><\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Cloud Provider<\/th><th>Deployment Options<\/th><th>Notes<\/th><\/tr><\/thead><tbody><tr><td><strong>AWS<\/strong><\/td><td>EC2, S3, RDS, EKS, SageMaker<\/td><td>Full MLOps lifecycle possible<\/td><\/tr><tr><td><strong>Azure<\/strong><\/td><td>Azure ML, AKS, Blob Storage, PostgreSQL<\/td><td>Azure ML integrates natively<\/td><\/tr><tr><td><strong>GCP<\/strong><\/td><td>Compute Engine, GKE, Cloud Storage, Vertex AI<\/td><td>Vertex AI can integrate with MLflow<\/td><\/tr><tr><td><strong>Any Cloud<\/strong><\/td><td>Docker + Cloud VM or Kubernetes<\/td><td>Most flexible, cloud-agnostic<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83d\udd27 <strong>1. MLflow on AWS<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Option A: Minimal Setup (Quick Start)<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u2705 <strong>Launch an EC2 instance<\/strong><\/li>\n\n\n\n<li>\u2705 SSH into the instance<\/li>\n\n\n\n<li>\u2705 Install MLflow:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>pip install mlflow\n<\/code><\/pre>\n\n\n\n<ol start=\"4\" class=\"wp-block-list\">\n<li>\u2705 Run MLflow Tracking Server:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>mlflow server \\\n  --backend-store-uri sqlite:\/\/\/mlflow.db \\\n  --default-artifact-root s3:\/\/your-bucket\/mlflow\/ \\\n  --host 0.0.0.0 --port 5000\n<\/code><\/pre>\n\n\n\n<ol start=\"5\" class=\"wp-block-list\">\n<li>\u2705 Open port 5000 on EC2 security group.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">Option B: Production Setup<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Backend DB<\/strong>: Amazon RDS (PostgreSQL or MySQL)<\/li>\n\n\n\n<li><strong>Artifact Store<\/strong>: Amazon S3<\/li>\n\n\n\n<li><strong>Authentication<\/strong>: Use AWS Cognito, reverse proxy + Oauth<\/li>\n\n\n\n<li><strong>Serving<\/strong>: Deploy MLflow models via <strong>SageMaker<\/strong>, <strong>ECS<\/strong>, or <strong>FastAPI + Docker<\/strong><\/li>\n\n\n\n<li><strong>Monitoring<\/strong>: CloudWatch for logs + Prometheus for custom metrics<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u2601\ufe0f <strong>2. MLflow on Azure<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Option A: Azure Virtual Machine + Storage<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Create an Azure VM<\/li>\n\n\n\n<li>Use Azure Blob Storage as artifact store<\/li>\n\n\n\n<li>Use Azure PostgreSQL\/MySQL as backend<\/li>\n\n\n\n<li>Run MLflow tracking server<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>mlflow server \\\n  --backend-store-uri postgresql:\/\/&lt;user&gt;:&lt;pass&gt;@&lt;host&gt;\/mlflow \\\n  --default-artifact-root wasbs:\/\/&lt;container&gt;@&lt;account&gt;.blob.core.windows.net\/mlflow\/ \\\n  --host 0.0.0.0\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Option B: Azure ML Studio Integration<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>MLflow is <strong>natively supported<\/strong> in Azure ML.<\/li>\n\n\n\n<li>You can log experiments, models, and metrics directly via:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>import mlflow\nmlflow.start_run()\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83c\udf29\ufe0f <strong>3. MLflow on GCP<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Option A: Compute Engine<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Create a Compute VM<\/li>\n\n\n\n<li>Use <strong>Google Cloud Storage (GCS)<\/strong> for artifacts<\/li>\n\n\n\n<li>Use <strong>Cloud SQL<\/strong> (PostgreSQL) for backend<\/li>\n\n\n\n<li>Install MLflow and run it similarly to other clouds<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>mlflow server \\\n  --backend-store-uri postgresql:\/\/user:pass@host\/mlflow \\\n  --default-artifact-root gs:\/\/your-bucket\/mlflow\/ \\\n  --host 0.0.0.0\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Option B: Kubernetes (GKE)<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Deploy MLflow on GKE cluster using <strong>Helm chart<\/strong> or <strong>custom YAMLs<\/strong><\/li>\n\n\n\n<li>Use GCS + CloudSQL<\/li>\n\n\n\n<li>Use <strong>Ingress<\/strong> with HTTPS and Oauth for security<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83d\udc33 <strong>4. Cloud-Agnostic Setup (Using Docker)<\/strong><\/h2>\n\n\n\n<p>You can deploy MLflow anywhere (DigitalOcean, Oracle Cloud, etc.) using Docker:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker run -it -p 5000:5000 \\\n  -v $(pwd)\/mlruns:\/mlflow\/mlruns \\\n  -e MLFLOW_TRACKING_URI=http:\/\/localhost:5000 \\\n  mlflow\/mlflow:latest server \\\n  --backend-store-uri sqlite:\/\/\/mlflow.db \\\n  --default-artifact-root .\/mlruns \\\n  --host 0.0.0.0\n<\/code><\/pre>\n\n\n\n<p>You can also create a <strong>Docker Compose<\/strong> file for MLflow + PostgreSQL + Nginx + SSL setup.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83c\udfaf Best Practices<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Task<\/th><th>Recommendation<\/th><\/tr><\/thead><tbody><tr><td>Backend DB<\/td><td>Use PostgreSQL or MySQL (not SQLite in prod)<\/td><\/tr><tr><td>Artifact Store<\/td><td>Use S3, GCS, or Azure Blob<\/td><\/tr><tr><td>Authentication<\/td><td>Use NGINX + OAuth or API Gateway<\/td><\/tr><tr><td>Deployment Method<\/td><td>Use Docker or Kubernetes for scaling<\/td><\/tr><tr><td>CI\/CD Integration<\/td><td>Use GitHub Actions, Jenkins, or GitLab CI to auto log runs<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>Would you like me to generate:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>A <strong>Docker Compose setup<\/strong><\/li>\n\n\n\n<li>A <strong>Helm chart<\/strong><\/li>\n\n\n\n<li>A <strong>Terraform script<\/strong> to deploy MLflow on AWS or Azure?<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Great question! Deploying MLflow on various cloud platforms enables centralized tracking, model registry, and production-ready serving. Below is a complete [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-43","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/aiopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/43","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/aiopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/aiopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/aiopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/aiopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=43"}],"version-history":[{"count":1,"href":"https:\/\/aiopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/43\/revisions"}],"predecessor-version":[{"id":44,"href":"https:\/\/aiopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/43\/revisions\/44"}],"wp:attachment":[{"href":"https:\/\/aiopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=43"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/aiopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=43"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/aiopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=43"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}