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:
- Pin every dependency including CUDA and driver compatibility
- Build once, run anywhere — laptop, CI, prod
- Roll back instantly — pull the previous tag
- Diff what changed — image hash +
docker history