Optimized Python Docker Image

  • Binary docker image, with no (public) reproducible build system? No thanks.

  • So I see that profile-guided optimization are being used.

    Profile-guided optimization, in layman terms, means that you run you code under a profiler for a while, see what parts (branches, functions, data structures etc) are being used the most and use this information to make a build of your code that considers the profiler's findings when doing optimization.

    So what does it mean? It means, basically, that revsys is publishing a python build that is optimized for their use-case. Which may or may not be your use-case. This is not good nor bad.

    Still, the claim "up to 19% faster" is false in general (but true in a particular case -- their use case).

    Just keep this in mind, because this python build might perform worse than a regular python build.

  • I've been using --enable-optimizations for a while, and built my own 3.6 images a couple of weeks back.

    Here's the Dockerfiles and readme:

    https://github.com/rcarmo/ubuntu-python

  • Am I totally misunderstanding something or there is no Dockerfile referenced? If so, is this just a binary blob I pull from a public registry?

    I have some trust concerns about basing my infrastructure on something opaque.

  • This was just mentioned today at north bay python.

    Another alternative for a fast speed up by changing your base image is trying out the pypy images.

  • Why aren't these just upstreamed onto the official Python binaries?

  • The 10%ish speed boost is all down to PGO, I'm assuming?