I dockerize an python app that has a dependency on a package that has dependency in numpy, pandas, scipy, etc..
Actually in the actual app only part of that dependencies are actually used.
But when I install the application in dockerfile, all the wheels are downloaded and unpacked. Which leads to an layer of roughly 500MB in size.
I already used pip --no-cache-dir
to make it a bit smaller, but of course the unpacked deps are still there.
Can one do some nagic to only keep the actually used modules instead of all those huge packages?