Introduction
Let’s talk about an uncomfortable truth: most of us are shipping Docker images that are embarrassingly large. If you’re deploying ML models, there’s a good chance your containers are over 2GB. Mine were pushing 3GB until recently.
The thing is, we know better. We’ve all read the best practices. But when you’re trying to get a model into production, it’s tempting to just FROM pytorch/pytorch and call it a day. This article walks through the practical reality of optimizing Docker images, including the trade-offs nobody mentions.