You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the implementations of the py_image rules here always build an x86_64 Docker image. This docker image itself runs fine on ARM Macs, but there are some pain points around Pip packages that bundle C extensions - numpy being an example.
The root issue is that we ship the pip packages sourced by rules_python in the container, which are downloaded for the host machine's architecture. Since we use a container_pull of the x86 as the python base image, this gives us a mismatch between the container python runtime and the pip packages we ship if the container is built on an aarch64 machine.
cert-manager/cert-manager#1212 and kubernetes/test-infra#22362 provide examples of building different image architectures that may prove useful in sorting this out, at least for building different containers, but some work will remain for shipping proper pip wheels in the container based on its runtime.
The text was updated successfully, but these errors were encountered:
jessecureton
changed the title
Resolve host architecture issues for Python dependencies
Resolve host / container architecture mismatch
Nov 16, 2021
Currently the implementations of the py_image rules here always build an x86_64 Docker image. This docker image itself runs fine on ARM Macs, but there are some pain points around Pip packages that bundle C extensions -
numpy
being an example.The root issue is that we ship the pip packages sourced by rules_python in the container, which are downloaded for the host machine's architecture. Since we use a
container_pull
of the x86 as the python base image, this gives us a mismatch between the container python runtime and the pip packages we ship if the container is built on an aarch64 machine.cert-manager/cert-manager#1212 and kubernetes/test-infra#22362 provide examples of building different image architectures that may prove useful in sorting this out, at least for building different containers, but some work will remain for shipping proper pip wheels in the container based on its runtime.
The text was updated successfully, but these errors were encountered: