4 ms·
I disagree with the author on many counts, largely because I maintain two stable, multi-platform Python images: - https://github.com/insightfulsystems/alpine-p
by rcarmo 7y ago
I disagree with the author on many counts, largely because I maintain two stable, multi-platform Python images:
- https://github.com/insightfulsystems/alpine-python https://github.com/insightfulsystems/alpine-python
- https://github.com/rcarmo/ubuntu-python https://github.com/rcarmo/ubuntu-python
The first uses stock Alpine packages, and the second builds Python from scratch (with some optimizations) atop Ubuntu LTS, and they serve two different use cases, but maintaining both made me learn a few things and there are a few factual errors in the article.
For starters, yes, you can run manylinux wheels on Alpine. Here’s how to do it:
https://github.com/insightfulsystems/alpine-python/blob/master/3.6/Dockerfile#L28 https://github.com/insightfulsystems/alpine-python/blob/mast...
So no, you don’t need to recompile every single package for an Alpine Python runtime.
As to runtime differences, yes, they exist, but are _extremely_ dependent on your use cases. I have not encountered any of the bugs - I did have a few crashes with GPU libraries and Tensorflow (which is why I also maintain the Ubuntu-based version), but the author points out third-party accounts, one of which seems to be attributable to locale settings (which you should always set anyway).
Performance differences are negligible on Intel (at least for web apps using Sanic and asyncio - I don’t do much Django these days), and the inclusion of a link to buy a “production-ready template” mid-article is just... iffy.
Give us data and working code - I’d like to see an objective benchmark, for instance, and might even set up one with my own images.
- dkarp 7y agoThanks for sharing your manylinux wheels setup. Will the python packages just link the musl libc instead of glibc? If that's all that is needed then it makes me wonder why pip is only downloading wheels on glibc distros currently.
- mwarkentin 7y agoI confirmed I was able to install lxml from a wheel and parse a web page with it.
- rcarmo 7y agoIn my experience the only things that broke were the CUDA/NVIDIA bindings that are “several turtles down” from Keras and the like, but, again, these images serve different purposes and I use the Alpine ones mostly for web services and vanilla sci-kit stuff.