OpenFunction icon indicating copy to clipboard operation
OpenFunction copied to clipboard

Is OpenFunction compatible with ARM architectures? Like Mac M1s?

Open salaboy opened this issue 2 years ago • 4 comments

Description

I couldn't run OpenFunctions in a local KinD cluster running on an M1 Mac Machine (arm64) mostly because there are no openfunction builds for arm. Did I missed something?

Environmental

Mac OS, arm64, Kubernetes KinD

Expected behavior Openfunction images should be available for arm64 architecture.

Actual behavior Failed with:

WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested

To Reproduce Steps to reproduce the behavior:

  1. '..'
  2. '...'
  3. '....'
  4. See error

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Add any other context about the problem here.

salaboy avatar Dec 08 '23 09:12 salaboy

@salaboy Sorry for the delay. OpenFunction's arm support is currently blocked at the build part, the buildpacks we used currently doesn't support to build images for arm yet.

benjaminhuo avatar Dec 17 '23 11:12 benjaminhuo

@salaboy Sorry for the delay. OpenFunction's arm support is currently blocked at the build part, the buildpacks we used currently doesn't support to build images for arm yet.

@salaboy we haven't build arm64 images for OpenFunction yet because the builder we use haven't supported build arm64 images well enough, for example:

For go functions: https://github.com/OpenFunction/builder/tree/main/builders/go117 bazel run --platforms=@io_bazel_rules_go//go/toolchain:linux_amd64 //builders/go117/stack:build

The base image is amd64 only for now , we can upgrade it to a multi-arch one: https://github.com/OpenFunction/builder/blob/main/builders/go117/stack/parent.Dockerfile#L15

Python base image has similar issue https://github.com/OpenFunction/builder/blob/main/builders/py39/stack/parent.Dockerfile#L15

Another problem of go buildpacks is the binary is still amd64 only https://github.com/OpenFunction/builder/blob/main/builders/go117/stack/parent.Dockerfile#L38

Also we noticed an on-going process of the arm64 support in cnb(cloud native buildpacks) : https://github.com/buildpacks/rfcs/issues/294

benjaminhuo avatar Dec 19 '23 10:12 benjaminhuo

+1 ARM64 is very much in demand these days

zs-dima avatar Jan 20 '24 10:01 zs-dima

If ignore the builder step and only want to deploy openfunction on ARM64, how can build relevant ARM64 images about openfunction?thanks

elastic17 avatar Apr 10 '24 02:04 elastic17