Hacker News new | ask | show | jobs
by kissgyorgy 1888 days ago
Python is still more wildly used / popular language, but I never seen a Python container for a real project which was less than 1GB.
4 comments

Alpine containers for P3 go down to about 60MB for the baseline. Everything else is what you added in.

CPython doesn't generate anything, and the binary installers (including docs and all) are about 30MB. Hell, the 64b embeddable package for windows (https://docs.python.org/3/using/windows.html#the-embeddable-...) is 16MB uncompressed.

I've seen ones in MBs with alpine
I'm guessing you're doing ML here? Because the core python runtime is far smaller than that.
Yeah, ML libraries are a huge offender. The Torch 1.8.1 manylinux wheel is 1.6G unpacked, with 1.1G going to CUDA support.
Have you tried basing one on distroless? That has turned out pretty small python containers for me.