Complete for freeAdvanced

Course 23

Production ML, Cloud Deployment, and MLOps

A model that works in a notebook still has to answer requests, survive bad input, run the same way on every machine, and be traceable when something goes wrong. This course builds those habits on a running project: a service that predicts whether a food delivery will arrive late. You save a full scikit-learn pipeline with joblib, define the request contract with Pydantic, serve it from FastAPI with /health and /predict endpoints, test it with FastAPI's TestClient, and package it with Docker on a python:3.12-slim base. You then decide between batch, online, streaming, and edge serving with measured latency percentiles, throughput, and cost; schedule a batch job with GitHub Actions and deploy the API to a free host. Later modules version models and data with SHA-256 hashes, semantic versions, aliases, and model cards (with a file-based registry you write yourself and the equivalent MLflow calls), automate training pipelines and integration checks, deploy continuously, monitor latency, failures, and drift, and practise canaries, rollbacks, cost tuning, and incident response. Every Python cell on these pages was run to produce the output shown, and Dockerfiles, workflows, and shell commands are written exactly as the real tools expect them. Each core module has a Notes lesson, a Build-along, and a Practice set with hints and worked solutions, and the course ends with a capstone: a production-style ML service with its own deployment, monitoring, and rollback plan.

Free completion promise: Every lesson can be completed for $0. Python, scikit-learn, FastAPI, Docker Engine, and MLflow are open source; Docker Desktop is free for personal and educational use; GitHub accounts, public-repository Actions minutes, and the Codespaces allowance are free; and all data is generated by code on the page. Cloud hosting is optional, and the free tiers mentioned are never required.

What's inside

  • 24hand-written lessons
  • 19videos
  • 3step-through animations
  • 31diagrams, charts & live previews
  • 49quiz questions
  • 198code examples

Before you begin

Requirements & setup for Production ML, Cloud Deployment, and MLOps

Start with the complete free pathway below. Hardware, subscriptions, paid APIs, and cloud credits are never required.

Start here · free path

Your complete $0 setup

Every lesson can be completed for $0. Python, scikit-learn, FastAPI, Docker Engine, and MLflow are open source; Docker Desktop is free for personal and educational use; GitHub accounts, public-repository Actions minutes, and the Codespaces allowance are free; and all data is generated by code on the page. Cloud hosting is optional, and the free tiers mentioned are never required.

$0 required

Setup checklist

0 of 15 complete

This checklist is a temporary setup aid and resets when the page reloads. Saved course progress begins in the setup lessons below.

  1. Everything required for this course is free. Paid software, APIs, cloud credits, GPUs, and physical equipment are optional.

    About 2 min
  2. Install Python 3.12 (winget, python.org, Homebrew, or apt) and Git, and create a free GitHub account.

  3. Install Docker Desktop (Windows or macOS) or Docker Engine (Linux), start it, and run docker run hello-world.

    About 5 min
  4. Create the late-delivery project folder, make a virtual environment with Python 3.12, and activate it.

    About 5 min
  5. Install the pinned libraries with python -m pip install -r requirements-dev.txt, then run check_setup.py and smoke_test.py.

    About 5 min
  6. Every lesson works in Python 3.12 and Docker (Docker Desktop or Docker Engine), so GitHub Codespaces is never required.

  7. If you have GitHub Codespaces, use it where a lesson mentions it and compare your result with the lesson's.

    About 5 min
  8. If it doesn't match, finish that step in Python 3.12 and Docker (Docker Desktop or Docker Engine) and keep going.

    About 5 min
  9. Every lesson works in Python 3.12 and Docker (Docker Desktop or Docker Engine), so Render free web service is never required.

  10. If you have Render free web service, use it where a lesson mentions it and compare your result with the lesson's.

    About 5 min
  11. If it doesn't match, finish that step in Python 3.12 and Docker (Docker Desktop or Docker Engine) and keep going.

    About 5 min
  12. Every lesson works in Python 3.12 and Docker (Docker Desktop or Docker Engine), so MLflow is never required.

  13. If you have MLflow, use it where a lesson mentions it and compare your result with the lesson's.

    About 5 min
  14. If it doesn't match, finish that step in Python 3.12 and Docker (Docker Desktop or Docker Engine) and keep going.

    About 5 min
  15. Python 3.12 and Docker (Docker Desktop or Docker Engine): docker run hello-world prints "Hello from Docker!", check_setup.py shows [OK] for Python 3.12, the virtual environment, the pinned libraries, docker, and git, and smoke_test.py ends with "Smoke test passed." GitHub Codespaces: docker run hello-world prints "Hello from Docker!", check_setup.py shows [OK] for Python 3.12, the virtual environment, the pinned libraries, docker, and git, and smoke_test.py ends with "Smoke test passed." Render free web service: docker run hello-world prints "Hello from Docker!", check_setup.py shows [OK] for Python 3.12, the virtual environment, the pinned libraries, docker, and git, and smoke_test.py ends with "Smoke test passed." MLflow: docker run hello-world prints "Hello from Docker!", check_setup.py shows [OK] for Python 3.12, the virtual environment, the pinned libraries, docker, and git, and smoke_test.py ends with "Smoke test passed."

    About 5 min

Software

1 item

Python 3.12 and Docker (Docker Desktop or Docker Engine)

Python 3.12 in a virtual environment runs training, the FastAPI service, and the tests; Docker builds the service into an image and runs it as a container, exactly as a cloud host would. Python 3.12 matches the python:3.12-slim image the container is built from, so local tests describe what ships. Docker Desktop is free for personal use, education, and small businesses, and Docker Engine on Linux is open source. Without admin rights, or on a Chromebook, a free GitHub Codespace with the course's devcontainer.json provides Python 3.12, Docker, and Git in the browser.

Course need
Python 3.12 and Docker (Docker Desktop or Docker Engine)
Free

Python 3.12 in a virtual environment runs training, the FastAPI service, and the tests; Docker builds the service into an image and runs it as a container, exactly as a cloud host would. Python 3.12 matches the python:3.12-slim image the container is built from, so local tests describe what ships. Docker Desktop is free for personal use, education, and small businesses, and Docker Engine on Linux is open source. Without admin rights, or on a Chromebook, a free GitHub Codespace with the course's devcontainer.json provides Python 3.12, Docker, and Git in the browser. Every lesson is readable text with copyable code, keyboard-friendly quizzes and step-throughs, and videos with YouTube captions.

  1. Install Python 3.12 (winget, python.org, Homebrew, or apt) and Git, and create a free GitHub account.
  2. Install Docker Desktop (Windows or macOS) or Docker Engine (Linux), start it, and run docker run hello-world.
  3. Create the late-delivery project folder, make a virtual environment with Python 3.12, and activate it.
  4. Install the pinned libraries with python -m pip install -r requirements-dev.txt, then run check_setup.py and smoke_test.py.

Hardware

3 items

GitHub Codespaces

Optional. A browser-based Linux machine with VS Code; the free monthly allowance covers the course, and usage stops at the limit if no payment method is on file.

Optional
Python 3.12 and Docker (Docker Desktop or Docker Engine)
Free

Optional. Every lesson can be completed with Python 3.12 and Docker (Docker Desktop or Docker Engine); GitHub Codespaces is an extra for learners who have it. Optional equipment: every assessed outcome can be completed without it.

  1. Every lesson works in Python 3.12 and Docker (Docker Desktop or Docker Engine), so GitHub Codespaces is never required.
  2. If you have GitHub Codespaces, use it where a lesson mentions it and compare your result with the lesson's.
  3. If it doesn't match, finish that step in Python 3.12 and Docker (Docker Desktop or Docker Engine) and keep going.

Render free web service

Optional. A public URL for your Docker service; free instances sleep after 15 idle minutes and take about a minute to wake. Every lesson also works entirely on your own machine.

Optional
Python 3.12 and Docker (Docker Desktop or Docker Engine)
Free

Optional. Every lesson can be completed with Python 3.12 and Docker (Docker Desktop or Docker Engine); Render free web service is an extra for learners who have it. Optional equipment: every assessed outcome can be completed without it.

  1. Every lesson works in Python 3.12 and Docker (Docker Desktop or Docker Engine), so Render free web service is never required.
  2. If you have Render free web service, use it where a lesson mentions it and compare your result with the lesson's.
  3. If it doesn't match, finish that step in Python 3.12 and Docker (Docker Desktop or Docker Engine) and keep going.

MLflow

Optional. The open-source tracking server and model registry shown alongside the course's own file-based registry; install it in your development environment only.

Optional
Python 3.12 and Docker (Docker Desktop or Docker Engine)
Free

Optional. Every lesson can be completed with Python 3.12 and Docker (Docker Desktop or Docker Engine); MLflow is an extra for learners who have it. Optional equipment: every assessed outcome can be completed without it.

  1. Every lesson works in Python 3.12 and Docker (Docker Desktop or Docker Engine), so MLflow is never required.
  2. If you have MLflow, use it where a lesson mentions it and compare your result with the lesson's.
  3. If it doesn't match, finish that step in Python 3.12 and Docker (Docker Desktop or Docker Engine) and keep going.

Accounts

Nothing required

No external account is needed for this course.

What you will be able to do

Learning outcomes

  • Package a trained scikit-learn pipeline as a FastAPI service with a validated input contract, honest health checks, tests, and a non-root Docker image.
  • Choose batch, online, streaming, or edge serving from measured latency percentiles, throughput, Little's law sizing, and cost, and deploy a batch job and an API on free tiers.
  • Version models and data with content hashes, semantic versions, aliases, registry records, and model cards, and roll back by moving an alias.
  • Build training pipelines and CI/CD workflows in GitHub Actions that refuse to publish a model that fails its checks.
  • Monitor latency, failures, and data drift, run canary releases, and respond to incidents with a rollback plan and a clear owner.

Build real work

Assignments & capstone

Free tools accepted

Containerized, versioned prediction API

Train the late-delivery model, serve it with FastAPI /health and /predict endpoints and validated inputs, package it in a Docker image, register each version with a hashed record, and compare batch and online serving with measured latency.

Every lesson can be completed for $0. Python, scikit-learn, FastAPI, Docker Engine, and MLflow are open source; Docker Desktop is free for personal and educational use; GitHub accounts, public-repository Actions minutes, and the Codespaces allowance are free; and all data is generated by code on the page. Cloud hosting is optional, and the free tiers mentioned are never required. Submit your project file, or screenshots with descriptions, or a short demo.

Gated CI and a drift monitor

Write a GitHub Actions workflow whose data, model, and contract tests block a weak candidate, then build a monitor that reads the prediction log, computes PSI and the KS test, and raises the right alerts.

Every lesson can be completed for $0. Python, scikit-learn, FastAPI, Docker Engine, and MLflow are open source; Docker Desktop is free for personal and educational use; GitHub accounts, public-repository Actions minutes, and the Codespaces allowance are free; and all data is generated by code on the page. Cloud hosting is optional, and the free tiers mentioned are never required. Submit your project file, or screenshots with descriptions, or a short demo.

Final assessment

Production-style ML service

Ship an ML service an on-call team could run: a registered, versioned model behind a validated FastAPI contract in Docker, CI gates, prediction logging with drift alerts, a canary release, and a timed rollback drill, deployed on a free host. Deliverables: Dockerized FastAPI service with a model registry, CI workflow with data, model, and contract gates, Monitoring with drift and SLO alerts, Canary release and rollback runbook, README and model card, and Five-minute demo of a failure and recovery.

Prerequisites & pacing

Skills assumed

  • Python: functions, classes at a basic level, dictionaries, and reading a traceback
  • One complete scikit-learn workflow: train_test_split, fit, predict_proba, and a metric such as ROC AUC
  • Comfort running commands in a terminal and changing directories
  • Helpful but not required: what an HTTP request, a status code, and JSON are

Recommended prior courses

These are advisory, not locks. If you already have the skills listed above, enroll directly.

Choose your pace

  • self paced: 12 weeks at 6 hours per week
  • weekly: 12 weeks at 6 hours per week

Part of these learning paths

  • 🔬 Research and Production AI · step 2 of 2

    Take models out of the notebook — into reproducible science and into monitored production systems.

  • 🛠️ Agentic Systems · step 3 of 5

    Build tool-using AI agents that are auditable, permission-bounded, and evaluated against adversaries.

Course created by Zafir Shamsi.