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

devcontainer on ARM Based Computers / Apple Silicon Macs #2728

Closed
tinydogio-joshua opened this issue Aug 5, 2022 · 13 comments
Closed

devcontainer on ARM Based Computers / Apple Silicon Macs #2728

tinydogio-joshua opened this issue Aug 5, 2022 · 13 comments
Labels
Question Issue is a question?

Comments

@tinydogio-joshua
Copy link

tinydogio-joshua commented Aug 5, 2022

Question

Are there any plans of updating the devcontainer so it works on Macs with Apple Silicon or other ARM based hardware?

  • Is your question answered in our documentation? - Not that I could find.

  • Our team also monitors the FHIR Community chat @ http://chat.fhir.org - Cool.

Description
I have been trying to get the devcontainer working, but haven't had much luck. Digging into it I saw that the cosmos emulator container consistently crashes with the following error.

./cosmosdb-emulator: ERROR: Invalid mapping of address 0x40037db000 in reserved address space below 0x400000000000. Possible causes:
1) the process (itself, or via a wrapper) starts-up its own running environment sets the stack size limit to unlimited via syscall setrlimit(2);
2) the process (itself, or via a wrapper) adjusts its own execution domain and flag the system its legacy personality via syscall personality(2);
3) sysadmin deliberately sets the system to run on legacy VA layout mode by adjusting a sysctl knob vm.legacy_va_layout.

I was able to track down the following information and am now guessing the emulator is not currently supported with my hardware. I imagine this is going to come up in the future quite often and am wondering if there are plans to support Apple Silicon based Macs or other ARM based hardware.

https://docs.microsoft.com/en-us/azure/cosmos-db/linux-emulator?tabs=sql-api%2Cssl-netstd21#the-docker-container-failed-to-start

AB#94112

@tinydogio-joshua tinydogio-joshua added the Question Issue is a question? label Aug 5, 2022
@tinydogio-joshua tinydogio-joshua changed the title devcontainer with Apple Silicon Macs devcontainer on Apple Silicon Macs Aug 5, 2022
@tinydogio-joshua tinydogio-joshua changed the title devcontainer on Apple Silicon Macs devcontainer on ARM Based Computers / Apple Silicon Macs Aug 8, 2022
@tinydogio-joshua
Copy link
Author

Updated title and comment for future searching.

@mikaelweave
Copy link
Contributor

Hi @tinydogio-joshua,

As an avid Mac user, I want this to work as I'm planning on upgrading in the next year. Unfortunately, we are dependent on the containers for our persistence providers (SQL/Cosmos) which both have open issues for M1 support. We can't support an ARM host until they publish an ARM container.

I'm also keeping an eye on this work from the folks at Docker.
Using Rosetta for x86/64 Containers

Until then, we won't have an Apple Silicon dev container and you'd have to use Cosmos/SQL in Azure or QEMU for your dev flow. 😢

@tinydogio-joshua
Copy link
Author

Fair enough. I appreciate your time and info @mikaelweave. I'll be sure to keep an eye on those issues as well. 🙏

@mikaelweave
Copy link
Contributor

No problem, anytime. I'll keep an eye on this as well and will update here when I see a path to Apple Silicon support.

@EXPEkesheth
Copy link
Collaborator

Closing this thread, as the question is answered.

@mikaelweave
Copy link
Contributor

@tinydogio-joshua - it looks like Docker now has a page for this.

https://docs.docker.com/desktop/mac/apple-silicon/

@tinydogio-joshua
Copy link
Author

@tinydogio-joshua - it looks like Docker now has a page for this.

https://docs.docker.com/desktop/mac/apple-silicon/

Nice. I'll give it a shot soon. Thank you. 🙏

@tinydogio-joshua
Copy link
Author

@mikaelweave Were you able to get this working? I gave it a shot but didn't have much luck.

@mikaelweave
Copy link
Contributor

I don't have a Apple Silicon Mac, so can't test it out 😦

@tinydogio-joshua
Copy link
Author

I just tried with no luck. I am coming up with a procedure that looks promising though (even if not ideal).

@daveHylde
Copy link

I'm not sure why this issue has been closed. Getting the emulator to work on Apple Silicon hardware should be a high priority for the Azure Cosmos team. Since cross-platform functionality is a huge feature in the latest .NET releases it's a shame to see that the Azure tools don't share that focus.

I've created this post in Azure feedback - not sure if it'll have any impact, but worth a shot:
https://feedback.azure.com/d365community/idea/dc98013b-7348-ed11-a81b-000d3ae3db6e

@tinydogio-joshua
Copy link
Author

I figured it was closed as it's not really for this team to fix the core issue (CosmosDB Emulator). I'd also love to see it working. I read somewhere that Ventura enables Rosetta 2 in their virtualization framework that Docker can leverage to run x86 containers. Hopefully fixing the main issue. That said I've been disappointed to see people asking for this in multiple places from the CosmosDB emulator team and have been largely ignored with not even a comment in most cases.

@mikaelweave
Copy link
Contributor

mikaelweave commented Sep 6, 2023

@daveHylde, @tinydogio-joshua - been a while but have you checked out colima? It looks to use the standard docker cli APIs (you will still need to install docker and docker-compose via Brew).

https://code.visualstudio.com/remote/advancedcontainers/docker-options#_macos-colima

I'm going to start using colima on my Intel based Mac.

@daveHylde I agree but need the hardware to test out anything.

Literally just found colima 5 minutes ago and rushed back here.
https://jacobtomlinson.dev/posts/2022/goodbye-docker-desktop-for-mac-hello-colima/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Question Issue is a question?
Projects
None yet
Development

No branches or pull requests

4 participants