-
Notifications
You must be signed in to change notification settings - Fork 200
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
[Issue] Error opening sample in devcontainer in local M1 MacBookPro VS Code #952
Comments
Good sleuthing! I believe you are correct here. We are not yet building any ARM versions of azure-dev/cli/installer/install-azd.sh Lines 116 to 119 in a194585
This relied on the fact that Rosetta exists and allows M1s to run amd64 binaries. That assumption falls apart on *nix, where there is no Rosetta. I suspect that we should start building and publishing arm64 binaries for all the supported OSes. Go makes this pretty easy, we can run a In the meantime, I wonder if there's a way for us to force passing |
/cc @danieljurek Since you've been looking at codespaces/devcointainer stuff recently. |
In order to get this to work we'll need to build an ARM64 Go binary for Linux. We can cross-compile this but will need a way to verify that the software works and is testable in order to support such a release. Started doing some research:
ARM64 Linux/Windows images are NOT supported by default in Azure DevOps Pipelines. To run this we'll need to install prerequisite tools. Some of these can be installed successfully (like PowerShell) but I encountered an issue installing the correct version of Go. This is starting to look like it'll require an iterative process to get working. Additional steps not yet tested: (all have been categorized at the moment) Steps requiring fixes:
Steps not requiring fixes:
|
This is a good catch! We definitely want to get ARM build of azd lit up. Looks like this is already in the current milestone (which seems appropriate to me). |
@pamelafox -- As a short term fix try changing the line in the devcontainer FROM mcr.microsoft.com/vscode/devcontainers/base:0-${VARIANT} to include FROM --platform=amd64 mcr.microsoft.com/vscode/devcontainers/base:0-${VARIANT} Does this unblock your work? |
That does seem to work, yes! I am not blocked since I can either use Codespaces or just choose to not open in devcontainer, but its neat that I can open the devcontainer locally now. |
Output from
azd version
(I don't believe it would be accurate to report this, since this issue is about azd in the Docker)
Describe the bug
When I git clone https://github.com/Azure-Samples/todo-python-mongo locally and open in VS Code with the Devcontainer extension, it prompts me to reopen in the devcontainer.
I then reopen in devcontainer, but it always errors out on the stage of installing azd with "ERROR: Architecture not supported: aarch64 on platform: linux"
Here is the full output:
I assume this is related to the fact that my MBP is an M1, based on the error about aarch64.
I am able to install azd locally:
That downloads an AMD64 build, not an arm64 build, but it seems to work fine.
Environment
VS Code:
Version: 1.72.2 (Universal)
Commit: d045a5eda657f4d7b676dedbfa7aab8207f8a075
Date: 2022-10-12T22:16:30.254Z
Electron: 19.0.17
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
OS: Darwin arm64 21.6.0
Sandboxed: No
Additional context
I have had issues in devcontainer in the past when I had extensions enabled for my Docker desktop app, but I've since turned them off since they cause issues.
The text was updated successfully, but these errors were encountered: