Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running Ruby, Node, Python and Docker on the new Apple Silicon architecture? [closed]

How do you get a Ruby, Python and Node.js development environments running on Apple Silicon architecture. What about virtualization software e.g. Docker?

like image 959
Igor P Avatar asked Nov 10 '20 18:11

Igor P


People also ask

How does Docker desktop work on Apple’s new hardware?

Under the hood of Docker Desktop, we run a virtual machine, to achieve this on Apple’s new hardware we need to move onto Apple’s new hypervisor framework. We also need to do all the plumbing that provides the core experience of Docker Desktop, allowing you to docker run from your terminal as you can today.

Is Python compiled on the new Macs?

However, the Python interpreter itself is a compiled program, and many Python data science libraries (like NumPy, pandas, Tensorflow, PyTorch, etc.) contain compiled code as well. Those packages all need to be recompiled on macOS for ARM64 CPUs to run natively on the new M1-based Macs. However, Apple has a solution for that, too.

Is Ruby compatible with arm and Intel CPUs?

As always, the package came with an installation of Ruby, but for the first time, it came with a universal binary to support both ARM and Intel CPUs — and with that a journey begins. For experienced Ruby developers, this story may be nothing new and/or in unnecessarily complicated. I just want to share my experience, insights, and results here.

Can I run Ruby on a Mac M1?

You can run ruby, python etc. directly on a Mac M1 by setting up a terminal that runs under Rosetta mode. Then run home brew and you can use the existing x86_64 architecture brew taps. I'm using /bin/bash as my Mac shell rather than zsh but you could adapt the below for zsh if you prefer.


1 Answers

Programming languages such as Ruby, Node and Python should run on Apple M1 Chip but Docker is not supported as of now (They are working on it)

Docker for Mac Issue https://github.com/docker/for-mac/issues/4733

Docker team might be working on fixing the issue as per this: https://github.com/docker/roadmap/issues/142

My Recommendation: Get it now only if you want to build iOS application. Since most of the people don't have the laptop right now, we might end up with a lot of other issues.

UPDATE: This one is more appropriate answer now: https://stackoverflow.com/a/65253659/8216911

like image 130
Ashutosh Kumar Avatar answered Sep 25 '22 01:09

Ashutosh Kumar