Skip to main content

Lesson 4 · 10 min

Containers & immutable deployments

Reproducible builds. Same image runs locally, in CI, in prod. No "works on my machine".

Why containers matter for ML

ML stacks have brutal dependency trees: CUDA + cuDNN + PyTorch + Transformers + bitsandbytes + xformers + flash-attn + custom kernels. A working environment is a finely-tuned house of cards.

Docker / OCI images let you:

  1. Pin every dependency including CUDA and driver compatibility
  2. Build once, run anywhere — laptop, CI, prod
  3. Roll back instantly — pull the previous tag
  4. Diff what changed — image hash + docker history