Start studying
Module 14 · MLOps / LLMOps Module contents
Module 14  ·  Card 3 / 22beginner

Docker

Docker packages your code, dependencies and runtime into one image.

The image runs identically on your laptop and in production.

A Dockerfile is the recipe describing how the image is built.

It eliminates the entire class of works on my machine failures.

It is the unit of deployment for essentially every cloud platform.

Learn in depth ↓
Module 14 · MLOps / LLMOps · 22 concepts
In depth  /  15 lines

Docker, in more detail

Docker packages your code, its dependencies and its runtime into one image.

That image runs the same way on your laptop and in production.

It removes the entire class of failures that begin with works on my machine.

A Dockerfile is the recipe, listing the base image, the dependencies and the command.

Each instruction creates a layer, and unchanged layers are cached between builds.

Ordering matters, so copy the dependency list and install before copying your source.

Otherwise every code change reinstalls everything.

Multi-stage builds compile in one image and copy only the result into a small final one.

That keeps images small, which speeds deployment and reduces attack surface.

Pin versions, since latest means the image changes underneath you without warning.

Do not bake model weights into the image if they are large.

Mount them or fetch them at startup so the image stays manageable.

GPU access needs the NVIDIA container runtime, which is a common first stumbling block.

Never put secrets in the image, since anyone who can pull it can read them.

It is the unit of deployment for essentially every cloud platform.

Want the full technical article? Wikipedia ↗
Test yourself

One question on this card. Every option explains itself once you pick, right or wrong.

Question 1
What class of failure does Docker eliminate?
MLOps / LLMOps

22 concepts in this module, then a graded test with every answer explained.

Study this module →
↑↓ move↵ openesc close