Reducing a Docker Image from 21 GB to 5 GB on EC2Reducing a Docker Image from 21 GB to 5 GB on EC2
The network for creativity
Join 1.25M professional creatives like you
Connect with clients, get discovered, and run your business 100% commission-free
Creatives on Contra have earned over $150M and we are just getting started
21 GB down to about 5 GB, same features 🐳
In F1, extra weight costs lap time. In production, my EC2 host ran out of disk in the middle of a deploy.
I attached a new EBS volume to the running server and finished the deploy. Then the Docker image went on a diet: CPU-only PyTorch because the server has no GPU, a slim Python 3.11 base, and no pip cache.
Same chat, about a quarter of the weight. Light wins, on track and in production 🏁
What's the heaviest thing you've found in a Docker image? 👇
Back to feed
The network for creativity
Join 1.25M professional creatives like you
Connect with clients, get discovered, and run your business 100% commission-free
Creatives on Contra have earned over $150M and we are just getting started