Skip to content
codewithmuhPublic

About

MLOps for DevOps Engineers: End-to-end production ML pipeline with FastAPI, Docker, EKS, MLflow, DVC & Drift Retraining

Topics

Resources

Code of conduct

Contributing

Security policy

Accessibility

Stars

0 stars

Watchers

0 watching

Forks

MLOps for DevOps Engineers

Take one scikit-learn model from a .joblib file to a self-healing, auto-retraining production platform — the way a DevOps engineer already thinks.

GitHub Release License: MIT GitHub Stars GitHub Forks Python 3.10 FastAPI Kubernetes MLflow DVC Series YouTube


The companion code for the 11-part MLOps for DevOps Engineers series on devopsbymuh.com and YouTube. One small model — a California house-price predictor — goes through the full production journey: serving, containers, CI/CD, model and data versioning, Kubernetes, infrastructure as code, monitoring, and drift-triggered retraining.

If you already know DevOps, you already know most of MLOps. This series is the rest.

flowchart TD
    subgraph Data["1. Data & Model Versioning"]
        DVC["DVC + AWS S3 (Dataset Tracking)"]
        Train["Model Training (scikit-learn)"]
        MLflow["MLflow Model Registry & Experiments"]
        DVC --> Train --> MLflow
    end

    subgraph CI["2. Continuous Integration & Packaging"]
        FastAPI["FastAPI Inference Service"]
        Docker["Multi-Stage Production Dockerfile"]
        ECR["AWS ECR (Container Registry)"]
        MLflow --> FastAPI
        FastAPI --> Docker --> ECR
    end

    subgraph Cloud["3. Cloud Orchestration & Serving"]
        Terraform["Terraform (AWS EKS Infrastructure)"]
        K8s["Amazon EKS (Autoscaled & Self-Healing Pods)"]
        Terraform --> K8s
        ECR --> K8s
    end

    subgraph Observability["4. Drift Detection & Auto-Retraining"]
        Prometheus["Prometheus Metrics & Grafana Dashboards"]
        Drift["Evidently AI / Drift Detector Daemon"]
        Retrain["Automated Retraining Pipeline"]
        
        K8s --> Prometheus
        Prometheus --> Drift
        Drift -->|Data/Model Drift Detected| Retrain
        Retrain -->|Evaluate Winner & Promote| MLflow
    end
Loading

Contents

How this repo is laid out

One folder per video. Each numbered folder is a complete, runnable project containing everything up to and including that episode — so you can drop into whichever video you're watching and run the whole thing, not a fragment.

01-introduction/     02-fastapi-serving/   03-docker/
04-cicd/             05-mlflow/            06-dvc/
07-kubernetes/       08-terraform/         09-monitoring/
10-drift/            11-end-to-end/

Start at 01, or jump to the episode you're on. Every folder has its own README.md with two sections that matter: Run it locally and Run it on a server. We always get it working on your laptop first (with Docker), then push the same thing to the cloud.

The series map

# Folder Video Article
1 01-introduction Introduction to MLOps 📖
2 02-fastapi-serving Serving ML Models with FastAPI 📖
3 03-docker Containerizing with Docker 📖
4 04-cicd CI/CD with GitHub Actions 📖
5 05-mlflow Model Versioning with MLflow 📖
6 06-dvc Data Versioning with DVC & S3 📖
7 07-kubernetes Deploying on Kubernetes 📖
8 08-terraform Infrastructure as Code 📖
9 09-monitoring Monitoring in Production 📖
10 10-drift Drift & Automated Retraining 📖
11 11-end-to-end End-to-End Platform 📖

Quick start

Pick the episode you're on and run it. Part 1 needs nothing but Python:

git clone https://github.com/codewithmuh/mlops.git
cd mlops/01-introduction

python3 -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt

python train.py      # trains the model → model/model.joblib
python predict.py    # loads it and prints one prediction

Every folder's README.md picks up from there with its own local and cloud steps.

The cloud we deploy to

Every "run it on a server" section targets AWS — ECR for images, EKS for Kubernetes, S3 for data and DVC. You can follow the local half of every episode with nothing but Docker; you only need an AWS account once you reach the cloud sections (parts 3 onward). The infrastructure that backs them is codified in 08-terraform.

Prerequisites

You'll pick these up as the series needs them — no need to install everything up front:

Tool Needed from
Python 3.10 Part 1
Docker Part 3
An AWS account + AWS CLI Part 3 (cloud sections)
kubectl Part 7
Terraform ≥ 1.6 Part 8

A note on the model artifact

You won't find a model.joblib committed anywhere. Every folder trains it in a few seconds with python train.py — training the artifact yourself is the point, and a 47 MB binary doesn't belong in git. (Parts 5 and 6 show where it does belong: a model registry and object storage.)

Repository maintenance

11-end-to-end/ is the source of truth — the complete platform. Folders 01–10 are cumulative subsets of it, generated by scripts/build_parts.sh:

bash scripts/build_parts.sh    # regenerate 01–10 from 11-end-to-end/

Fix a bug once in 11-end-to-end/, re-run the script, and the earlier folders regenerate. The per-folder README.md files are hand-written and the script preserves them.

Contributing

Issues and pull requests are welcome — typo fixes, clearer explanations, version bumps, or a bug in the code. If you're changing code, edit it in 11-end-to-end/ and re-run the build script so all folders stay in sync (never hand-edit 01–10). Please keep changes scoped to one part where possible.

Author

Muhammad Rashid — codewithmuh / DevOps by Muh

If this series helped you, a ⭐ on the repo and a subscribe on YouTube go a long way.

License

Released under the MIT License. Use it, fork it, teach with it.

About

MLOps for DevOps Engineers: End-to-end production ML pipeline with FastAPI, Docker, EKS, MLflow, DVC & Drift Retraining

Topics

Resources

Code of conduct

Contributing

Security policy

Accessibility

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages