liveBook · Manning

Docker

As explained in Machine Learning Platform Engineering

Docker is a platform and toolset for building, packaging, distributing, and running containerized applications.

Docker packages an application with its dependencies into a container, helping the same application run across local, cloud, and production environments. This addresses dependency and operating-system differences that commonly disrupt deployment. section 3.2

Use Docker as an operational foundation for production ML systems:

  • Package applications consistently before deploying them to Kubernetes or other environments. section 3.0
  • Run containers through a container runtime on worker nodes, while Kubernetes schedules and replaces them. section 3.3.1
  • Automate image builds and deployment through CI/CD and a container registry to reduce manual errors and accelerate releases. section 1.3.3 section 3.6

Containerizing a FastAPI service

A small FastAPI application can be developed locally with its Python requirements, tested with Uvicorn on port 8083, and then packaged into a Docker container. The same pattern applies to an ML-serving API whose dependencies include libraries such as TensorFlow, NumPy, OpenCV, and CMake. section 3.2.1 section 3.2

Figure 1.9 Model deployment consists of the container registry, CI/CD, and automation working in concert to deploy ML services.
A diagram of a model deployment

AI-generated content may be incorrect.

Trace how a code change becomes a rebuilt Docker image, enters a container registry, and reaches an updated ML service through deployment automation. section 1.3.3

How Machine Learning Platform Engineering covers it

How deep it goes
Explains containerization from first principles and demonstrates application setup, while deferring detailed image-building configuration.
Examples
Demonstrates object detection dependencies, a FastAPI joke service, Kubernetes runtimes, and a Docker Compose Langfuse deployment.
What it assumes
Assumes no prior Docker exposure and teaches the relationship between applications, dependencies, containers, runtimes, and orchestration.
What you can do after
Build it from scratch by packaging a dependency-bearing application and connecting its image to deployment automation.
How it connects
Connects containerization with Kubernetes, CI/CD, container registries, monitoring, and ML model deployment.

Also explained in

Compare how 26 books explain Docker →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Machine Learning Platform Engineering. The section links point to the parts of the book it draws on.