Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release for aarch64 #3112

Open
wonboyn opened this issue Aug 2, 2022 · 44 comments · May be fixed by #3584
Open

Release for aarch64 #3112

wonboyn opened this issue Aug 2, 2022 · 44 comments · May be fixed by #3584
Milestone

Comments

@wonboyn
Copy link

wonboyn commented Aug 2, 2022

At the moment there is a release for Linux amd64 & Mac arm64 but not Linux aarch64.
Can you please make a release of the tools available for aarch64 or provide build instructions.

Thanks

@iAmBipinPaul
Copy link

This may help (Raspberry PI 4 (linux-arm/linux-arm64)
#2180 (comment)

@alecglen
Copy link

@michaelpeng36 Pinging to increase priority on this if possible. It is closely related to #2834 because anyone attempting to develop Functions in a VS Code devcontainer while on an M1 Mac will be blocked.

@leeford
Copy link

leeford commented Aug 23, 2022

Agree 100%. I'm in the same boat. Cannot run on a Mac M1 inside a container.

@michaelpeng36 michaelpeng36 self-assigned this Aug 24, 2022
@EverybodyKurts
Copy link

@alecglen That's exactly what I'm attempted and failed to do 😆 .

@iAmBipinPaul
Copy link

Hi @michaelpeng36 any update on this?

@jchomarat
Copy link

@michaelpeng36 Pinging to increase priority on this if possible. It is closely related to #2834 because anyone attempting to develop Functions in a VS Code devcontainer while on an M1 Mac will be blocked.

Yeap, I had to reverse to an emulated container in x64 to have the func tools ... and it is very slow now :(

@michaelpeng36
Copy link
Contributor

Hey folks, sorry for missing these pings. I am no longer the primary engineer for Core Tools, so I'm not sure when this will get fixed, but I have reached out to the new owning team to get this prioritized. @khkh-ms , would you mind taking a look?

@michaelpeng36 michaelpeng36 removed their assignment Nov 22, 2022
@johngrahamreynolds
Copy link

@khkh-ms Any update on this being triaged or assigned?

@andrew-benson
Copy link

andrew-benson commented Feb 8, 2023

I'd really like a Linux ARM64 binary for my Chromebook. There's already support for .NET SDK's and VS Code for ARM64, they are working great
I've just seen a PR for Azure CLI to support ARM64.
So it only makes sense for this to drop next, please and thank you

Update: This worked on my Chromebook with Debian bullseye Arm64 👍 It is a lengthy process to get it it built and added to PATH if you're a Linux noob like me.

This may help (Raspberry PI 4 (linux-arm/linux-arm64) #2180 (comment)

@jchomarat
Copy link

I'd really like a Linux ARM64 binary for my Chromebook. There's already support for .NET SDK's and VS Code for ARM64, they are working great I've just seen a PR for Azure CLI to support ARM64. So it only makes sense for this to drop next, please and thank you

Update: This worked on my Chromebook with Debian bullseye Arm64 👍 It is a lengthy process to get it it built and added to PATH if you're a Linux noob like me.

This may help (Raspberry PI 4 (linux-arm/linux-arm64) #2180 (comment)

azure-cli on ARM64 has been supported for a long time. But yes, it'd be awesome to have also azure-func-core-tools for aarch64

@andrew-benson
Copy link

andrew-benson commented Feb 10, 2023

I'd really like a Linux ARM64 binary for my Chromebook. There's already support for .NET SDK's and VS Code for ARM64, they are working great I've just seen a PR for Azure CLI to support ARM64. So it only makes sense for this to drop next, please and thank you
Update: This worked on my Chromebook with Debian bullseye Arm64 👍 It is a lengthy process to get it it built and added to PATH if you're a Linux noob like me.

This may help (Raspberry PI 4 (linux-arm/linux-arm64) #2180 (comment)

azure-cli on ARM64 has been supported for a long time. But yes, it'd be awesome to have also azure-func-core-tools for aarch64

I had a look for it and tried installing azure-cli, although it pulled a package and installed something - it didn't work sadly due to python issue. Which is what this PR seems to be all about, as well as closing of a feature request from 2018 to support arm64.

@snotty
Copy link

snotty commented Feb 23, 2023

+1 on an ask to include azure functions install for arm64... the new Linux VMs for Ubuntu 22.04 LTS on Ampere ARM chips is a price performance leader for servers. azure-cli works (after python fix), dotnet is supported very well, VSCode supported well... just need Azure functions!

@sinedied
Copy link
Member

sinedied commented Mar 7, 2023

Another voice here. Using dev containers on M1/M2 Mac fails because there's no Linux ARM support for Core Tools.
Since support was added for M1/M2 macs, aarch64 should also be supported.

@kurt-mueller-osumc
Copy link

It's been about 7 months since this issue was opened. Is there any movement / progress on azure function core tools adding support for aarch64?

@TheRealWaldo
Copy link

Also running into the same issue, func fails to run inside linux devcontainers when running on M1 Macs.

❯ func
qemu-x86_64: Could not open '/lib64/ld-linux-x86-64.so.2': No such file or directory

@odidev
Copy link

odidev commented May 31, 2023

May I know, when are you planning to release it for Linux Aarch64? It would be really helpful for us if it were available for Aarch64.

@aadamsx
Copy link

aadamsx commented Jun 16, 2023

Yes why is it years before we get this basic capability, especially when the M1/M2 macs are commonly used for software development? It's not just this, MS has also not provided the capability to emulate Cosmos DB on arm64 processors, forcing developers to use cloud Cosmos for devlopment -- a very costly path. It seems MS has deprioritized Mac with Apple Silicon all around.

@mohsinonxrm
Copy link

mohsinonxrm commented Aug 10, 2023

I've just built the binaries myself, you can try from here:
https://github.com/mohsinonxrm/azure-functions-core-tools/releases/tag/4.23_arm64

Otherwise you can build it yourself as well but dotnet release -r linux-arm64

Next, you can use the azure function dotnet docker images:
https://hub.docker.com/r/mohsinonxrm/azure-functions-dotnet/tags

@EverybodyKurts
Copy link

@mohsinonxrm, can you point me to a repo that has the Dockerfile you used for these builds? I'd appreciate it :).

@jlaundry
Copy link

jlaundry commented Nov 28, 2023

Now that #915 is closed as "support for ARM 64 is now released", may we please have an update on when Linux arm64 support will also land?

As per @lucasfijen in Azure/azure-functions-python-worker#915 (comment), azure-functions-core-tools has still not landed in the binary-arm64 Packages file, which prevents using it in arm64 devcontainers.

@dan-consignly
Copy link

It's now 2024, and this issue is still open, and is causing a real headaches for our devs using Apple silicon.

@khkh-ms Can we please get an update on this?

@kurt-mueller-osumc
Copy link

My workaround for this is emulating amd64 architecture then using setting the following env variable:

ENV DOTNET_EnableWriteXorExecute=0

Turning off this environment variable (I think) turns off some sort of memory optimization and allows me to restore my dotnet projects and boot up the azure functions core tools.

@danieljurek
Copy link
Member

danieljurek commented Jan 16, 2024

azd encounters this issue when running func tools in a Linux devcontainer on Apple Silicon (M1/M2 macs). Azure/azure-dev#2593

@amih90 amih90 linked a pull request Jan 26, 2024 that will close this issue
5 tasks
@fprotazio
Copy link

@michaelpeng36 Pinging to increase priority on this if possible. It is closely related to #2834 because anyone attempting to develop Functions in a VS Code devcontainer while on an M1 Mac will be blocked.

I just ran into this. Installed the tool via npm and got a rosetta error then I checked the actual code on npm and saw they do not support Linux aarch64.

@manekinekko
Copy link
Member

I can reproduce the same rosetta error on a M3 Mac.

@kurt-mueller-osumc
Copy link

It's been about a year and half since this issue was opened. Is there any way we can get an update on if/when there'll be a release for aarch64?

@iAmBipinPaul
Copy link

any ETA on this ?

@pleberre
Copy link

Same here would appreciate an ETA on this.

@EverybodyKurts
Copy link

EverybodyKurts commented Mar 28, 2024

There's a pull request, #3584, that references this issue. It's been open for 2 months without anybody reviewing it.

I suggest we bug people on that thread as well :)

@szszoke
Copy link

szszoke commented Mar 28, 2024

We ended up making our own image for the Dev Container and building the PR's branch instead of using the official binaries.

Seems to work fine so far.

@clowa
Copy link

clowa commented Apr 6, 2024

Same here - I have to somehow get the azure-functions-core-tools working in a devcontainer on apple silicon.
I'm currently using the workaround build of @mohsinonxrm via a custom Dockerfile (see below), but it doesn't feel right.

FROM node:18-bullseye

# Install azure function core tools using the workaround
RUN curl -L https://github.com/mohsinonxrm/azure-functions-core-tools/releases/download/4.23_arm64/Azure.Functions.Cli.linux-ARM64.zip -o azure-functions-cli.zip \
    && unzip azure-functions-cli.zip -d /opt/ \
    && mv /opt/Azure.Functions.Cli.linux-ARM64 /opt/azure-functions-cli \
    && ln -s /opt/azure-functions-cli/func /usr/local/bin/func \
    && chmod +x /opt/azure-functions-cli/func \
    && rm -f azure-functions-cli.zip

@ross-p-smith
Copy link

We have had a little success forcing our devcontainers to be amd64

FROM --platform=linux/amd64

https://github.com/Azure-Samples/chat-with-your-data-solution-accelerator/blob/a16c5107062573403490f01819dd5bbde1b41cb1/.devcontainer/Dockerfile#L1

@andrasg
Copy link

andrasg commented Apr 18, 2024

We have had a little success forcing our devcontainers to be amd64

I was able to run a node project this way on an M3 mac in devcontainers.

@dirkesquire
Copy link

We have had a little success forcing our devcontainers to be amd64

FROM --platform=linux/amd64

This does work somewhat, but it is SUPER SLOW. I wasn't able to install any VS Extensions for Python and Azure Functions to actually debug and work work with the code. The install would go on and on forever... (really slow)

@juergstaub
Copy link

We have had a little success forcing our devcontainers to be amd64
FROM --platform=linux/amd64

This does work somewhat, but it is SUPER SLOW. I wasn't able to install any VS Extensions for Python and Azure Functions to actually debug and work work with the code. The install would go on and on forever... (really slow)

Can confirm exactly this, PyLance hangs in while installing and it is extremely slow.

@juergstaub
Copy link

juergstaub commented May 22, 2024

Same here - I have to somehow get the azure-functions-core-tools working in a devcontainer on apple silicon. I'm currently using the workaround build of @mohsinonxrm via a custom Dockerfile (see below), but it doesn't feel right.

FROM node:18-bullseye

# Install azure function core tools using the workaround
RUN curl -L https://github.com/mohsinonxrm/azure-functions-core-tools/releases/download/4.23_arm64/Azure.Functions.Cli.linux-ARM64.zip -o azure-functions-cli.zip \
    && unzip azure-functions-cli.zip -d /opt/ \
    && mv /opt/Azure.Functions.Cli.linux-ARM64 /opt/azure-functions-cli \
    && ln -s /opt/azure-functions-cli/func /usr/local/bin/func \
    && chmod +x /opt/azure-functions-cli/func \
    && rm -f azure-functions-cli.zip

Has anyone getting this to work? I also followed this part here: Support running on M1 Macs

then start func fails here:

ImportError: cannot import name _observability,ImportError: cannot import name _observability,ImportError: cannot import name _observability.

No resolution so far, pip install cygrpc as suggested, failed with a missing header file or so, my platform is linux/arm64, Python 3.11 on Mac M1, having a proper build for this platform would really help.

@stewartadam
Copy link

@michaelpeng36 what's the current status of this? Anyone using devcontainer on modern Macs is blocked by this.

@iAmBipinPaul
Copy link

also, it will be blocked on upcoming Snapdragon x powered PCs.
@manekinekko any update on this?

@thsunkid
Copy link

@juergstaub
Re: ImportError: cannot import name _observability. I got the same issue. Tldr; make sure you used python3.9, not python3.10, ..

The detailed error from my side shows that it happened inside this file src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi which doesn't exist under the grpcio/grpc/_cython. I searched over the binary file _cython/cygrpc.cpython-310-darwin.so and it seems like the import _observability is there.

File "src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi", line 15, in init grpc._cython.cygrpc
ImportError: cannot import name _observability
ERROR: unhandled error in functions worker: cannot import name _observability

@rbnswartz
Copy link

Causing problems for us too. Stops one of our devs on OSX from running our container.

@jjgriff93
Copy link
Member

2 years later, still an issue.

@aadamsx
Copy link

aadamsx commented Aug 2, 2024

2 years later, still an issue.

it's clear, no matter what they say at this point, it's not a priority, or heck even a want, for them.

@shreyabatra4
Copy link

Hi everyone, thank you so much for your feedback and patience. We are looking into this issue and will provide an update soon.

@clowa
Copy link

clowa commented Aug 26, 2024

Same here - I have to somehow get the azure-functions-core-tools working in a devcontainer on apple silicon. I'm currently using the workaround build of @mohsinonxrm via a custom Dockerfile (see below), but it doesn't feel right.

FROM node:18-bullseye

# Install azure function core tools using the workaround
RUN curl -L https://github.com/mohsinonxrm/azure-functions-core-tools/releases/download/4.23_arm64/Azure.Functions.Cli.linux-ARM64.zip -o azure-functions-cli.zip \
    && unzip azure-functions-cli.zip -d /opt/ \
    && mv /opt/Azure.Functions.Cli.linux-ARM64 /opt/azure-functions-cli \
    && ln -s /opt/azure-functions-cli/func /usr/local/bin/func \
    && chmod +x /opt/azure-functions-cli/func \
    && rm -f azure-functions-cli.zip

Has anyone getting this to work? I also followed this part here: Support running on M1 Macs

then start func fails here:

ImportError: cannot import name _observability,ImportError: cannot import name _observability,ImportError: cannot import name _observability.

No resolution so far, pip install cygrpc as suggested, failed with a missing header file or so, my platform is linux/arm64, Python 3.11 on Mac M1, having a proper build for this platform would really help.

@juergstaub I got it working. You can have a look at a full example here.

However, the important parts are the following:

  1. Build the azure function core tools form source by using the workaround of @amih90:
FROM mcr.microsoft.com/dotnet/sdk:8.0 as azure-functions-core-tools

# Dotnet caching - see: https://github.com/dotnet/dotnet-docker/issues/3353#issuecomment-996013919
RUN --mount=type=cache,id=nuget,target=/root/.nuget/packages \ 
    git clone https://github.com/amih90/azure-functions-core-tools.git /tmp/azure-functions-core-tools
WORKDIR /tmp/azure-functions-core-tools
# RUN git checkout amih90/linux-arm64 \
RUN git checkout b7cb908431f6aed5b509e32fc1e56a740b6eee02 \
    && dotnet publish src/Azure.Functions.Cli/Azure.Functions.Cli.csproj --runtime linux-arm64 --output /opt/azure-functions-core-tools
  1. Copy the compiled func cli to the final container.
    I'm not sure, but I think it's important to use a debian/ubuntu based base image
FROM node:18-bookworm as final
[...]
RUN ln -s /opt/azure-functions-core-tools/func /usr/local/bin/func \
&& chmod +x /opt/azure-functions-core-tools/func \
&& rm -f azure-functions-cli.zip
[...]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.