TL;DR: I’m currently attempting to bridge the gap between the TensorFlow SIG Build group and the PyPA to try and determine the future for the manylinux spec. We’ve got a couple options and need to determine what makes sense for us and for interested stakeholders.
The current status
You might say:
“Why are we talking about the next manylinux, when we don’t even have manylinux2010 yet?”
The rollout for manylinux2010 has been long and painful, and in the meantime, the projects which are most interested in using it are ready to move on to newer tooling than it originally specified.
The rollout for manylinux2010 has been tracked in pypa/manylinux#179, here’s a rough timeline (partially courtesy @njs):
- March 2017: CentOS 5 went EOL
- April 2018: PEP 517 accepted
- May 2018: support for manylinux2010 lands in warehouse
- Nov 2018: support lands in auditwheel, and pip master
- Jan 2019: Pip 19.0 released with manylinux2010 platform tag support
- Jan 2019: Auditwheel 2.0.0 released with manylinux2010 support
- March 2019: Two years after CentOS 5 EOL, we still don’t have an official build environment
- Nov 2020: CentOS 6 will go EOL
There’s currently three open PRs in pypa/manylinux
attempting to add the build environment, but they are moving slowly and it’s not clear who should review them, or if anyone is able to review them.
In short: Users are ready to use the next manylinux, but we haven’t even fully implemented the last one yet.
Spec violations
It’s a common claim that certain projects are violating the manylinux specification(s) by uploading wheels that say they are manylinux compliant, but aren’t. This is true, and it’s true for a number of projects. However since TensorFlow is held as an example here most often, let’s pick on them.
According to the TensorFlow team, these wheels are attempting to be manylinux2010 compliant. They build TensorFlow packages on Ubuntu 14.04 to support 14.04 users (as it is the most common distro) and to be as close as possible to being manylinux2010-compliant. However, since an official build environment doesn’t exist yet, they are currently claiming that they are manylinux1 instead in order to just get something up on PyPI. This can cause issues for users who actually expect manylinux1 wheels.
(There are other issues causing non-compliance as well, but the team has plans to fix these problems.)
There was a recent proposal to “lint” for invalid wheels, due to this tweet from the creator of PyTorch (another project that publishes non-compliant wheels)
I’m in support of doing this… eventually. Doing it “right now” would essentially prevent all of these non-conforming projects from making any release at all until we either a) finish the manylinux2010 rollout, or b) have a better specification (and corresponding tooling).
So why not both?!
Finishing manylinux2010
We’re very close here. The big thing left to do is to finish the build environment. If you think you can help, see my comment and subsequent comments on the rollout issue.
The next manylinux spec
We have essentially two options here:
- Option 1: maintain the status quo
- Option 2: try to do some future-proofing
Option 1: manylinux2014
The TensorFlow SIG Build team has put together a proposal for a manylinux2014 specification. Their proposal is:
- Change build environment to CentOS 7, devtoolset-7
- Retain backwards compatibility with manylinux2010
- Officially add support for a subset of architectures that CentOS 7 supports:
- PowerPC: ppc64, ppc64le
- ARM: armhfp, aarch64
Aside from the additional architectures, this is essentially a continuation of the manylinux1 to manylinux2010 transition, and the smallest possible change to support a newer toolchain.
The TensorFlow SIG Build group has expressed interest in helping ship this, and given our experience with manylinux2010, I’d be optimistic that it would go faster than last time. However, this still might take several years from now to fully implement – CentOS 6 will go fully EOL on November 30th, 2020, so it might be EOL by the time the rollout is finished.
Option 2: A ‘perennial’ manylinux
In “Idea: perennial manylinux tag”, @njs reflected on the fact that the manylinux2010 rollout has been slow and painful, and that we might be able to avoid this pain by instead adding platform/glibc tags for manylinux distributions, allowing them to just naturally occur as new versions of glibc come into existence. The tag would be something like:
manylinux_${libc provider}_${libc version}_${arch}
which essentially means:
“I promise this wheel will work on any Linux system with glibc >={glibc version} and an {arch} processor”.
So equivalents would be:
manylinux1_x86_64
→manylinux_glibc_2_5_x86_64
manylinux2010_x86_64
→manylinux_glibc_2_12_x86_64
manylinux2014_x86_64
→manylinux_glibc_2_17_x86_64
Installers like pip
only need to be able to determine the glibc version and architecture, and won’t need updated every time a new manylinux spec is published – in fact, we won’t need to have this discussion and publish a spec everytime a project like Tensorflow would like to use a newer toolchain. To quote from @njs:
Instead, they’ll be [smaller] routine engineering problems for the docker image+auditwheel maintainers to solve.
This is about the same amount of work upfront, but with much less work down the line. I think this could fully support the needs of the manylinux2014 proposal.
Side note: Architectures
Both of these specifications would allow us to add some additional architectures that CentOS 7 supports. Being able to provide wheels for these architectures on PyPI would be highly desirable for a subset of our community that is not currently served by the current manylinux standards.
Conclusion
Against my better judgement, I’ve volunteered to author the PEP that defines this next specification.
However, I’d like to avoid writing two PEPs and leaving the Steering Council to decide. So I’m looking for buy-in from folks here about whether it’s worth continuing with the status quo, or whether it’s worth re-architecting this a bit to be more flexible and require less work in the future.
I’ve made the TensorFlow SIG Build group aware of this discussion topic, so they should be able to observe this thread and comment as necessary.
References:
- PEP 513 – A Platform Tag for Portable Linux Built Distributions
- PEP 571 – The manylinux2010 Platform Tag
- Tracking issue for manylinux2010 rollout
- ‘Perennial’ manylinux discussion: [distutils-sig] Idea: perennial manylinux tag
- TensorFlow SIG Build
manylinx2014
proposal: manylinux2014 PEP Planning - PyPI feature: Run auditwheel on new manylinux uploads, reject if it fails
- CentOS Product Specifications