jupyterhub / binderhub

Run your code in the cloud, with technology so advanced, it feels like magic!
https://binderhub.readthedocs.io
BSD 3-Clause "New" or "Revised" License
2.54k stars 388 forks source link

Container builds take 4x as long following base image switch to Python 3.11 #1636

Closed manics closed 1 year ago

manics commented 1 year ago

Bug description

https://github.com/jupyterhub/binderhub/actions/workflows/publish.yml?query=branch%3Amain

Container images based on Python 3.9 used to take around 30 minutes total for chartpress to publish the chart.

Following the switch to Python 3.11 this job takes around 2 hours.

consideRatio commented 1 year ago

I bet it relates to compiling things that have pre-built wheels for py39 but not for py311

consideRatio commented 1 year ago

The single build step that takes notable time is this one, but not form amd64 but for arm64. They may simply not have arm64 wheels - while its confusing why it was quick in arm64 on py39 I get why its not quick with py311.

#29 [linux/arm64 build-stage 6/6] RUN --mount=type=cache,target=/tmp/pip-cache     pip install build  && pip wheel         .         pycurl         -r helm-chart/images/binderhub/requirements.txt

The slowness stems from this dependency:

https://github.com/jupyterhub/binderhub/blob/c71a2034aed6deb86935dbe9ce76304ad4f871e3/helm-chart/images/binderhub/requirements.txt#L59-L64

I don't see a difference between arm wheels for py39 and py311 for grpcio 1.15.1, so I'm confused about that. I note though that they provide armv7 wheels, which is related to arm32 and not arm64, so I presume this isn't picked up for such reasons among things.

Related

minrk commented 1 year ago

Maybe best to switch the image to 3.10 for now?

consideRatio commented 1 year ago

It seems that this is to be fixed quite soon, I suggest we wait. See https://github.com/grpc/grpc/issues/32454 and note that their current release candidate has aarch64 wheels for py311. Actually, the 1.53.0 version with this fix is released, its just not published to PyPI, see https://github.com/grpc/grpc/issues/32702.

consideRatio commented 1 year ago