Thanks for the info Suvanjan Mukherjee,
It looks like Ubuntu 18.04 ships with 3.6 and only has builds up to
3.7.
python3-dev (3.6.5-3) header files and a static library for Python (default)
python3.6-dev (3.6.9-1~18.04ubuntu1.1 [amd64, i386], 3.6.5-3 [arm64, armhf, ppc64el, s390x]) [security] Header files and a static library for Python (v3.6)
python3.7-dev (3.7.3-2~18.04.1 [amd64, i386], 3.7.0~b3-1 [arm64, armhf, ppc64el, s390x]) [universe] [security] Header files and a static library for Python (v3.7)
I made a
PR that changes the `python3-dev` to `python3.7-dev` in the layer-definitions/layers/ubuntu1804. This would be a large improvement for pulling in OSS software. However I left a note about something that concerns me on the PR. It looks like some things use ubuntu1804 for RBE while the base image is using ubuntu1604 for everything. Python 3.7 should be backwards compatible but I don't know if native libraries will play nice with that. Just something we should look for before that hits master.
For a more long term discussion (that resolves the previous concern as well) it looks like the only ubuntu versions that have 3.8+ are 19.10 and 20.04LTS. Maybe we should look to moving the entire image into 20.04? To do this it looks like you pull base layers from GCR by hash. Unfortunately that gcr doesn't contain an Ubuntu 20.04LTS base image (I couldn't find one when searching
this).
Of course the other option would be going the google/dropbox route and moving away from a distribution-managed package and
just compile the python runtime from source. I don't know if some people would approve of that though. Or we could look into using distroless and build a completely distroless container bazel container that only contains bash, gcc/llvm, python{2,3}, java{8,11}, golang, etc and just cherry pick the exact versions we want.
Thanks,
- Josh