Running Ruby, Node, Python and Docker on the New Apple Silicon Architecture

How to get ARM Docker images when creating devcontainer is VS Code? (mac m1)

If you need the specific MCR containers, you will need to wait for them to be available for arm64.

However, if you do not need the specific image, you have ample amount of Docker images that are build for arm64 and can be found in the Docker HUB. You can search for arm64v8 or search for the image and check if the arm64 tag is displayed

In both cases, you can try to pull any image for linux/arm64 platform architecture as follows:

docker pull --platform linux/arm64 image

Final option is for you to build your own image. This can be a time consuming since you might face the need to port some of the libraries to arm64v8.

Forcing docker to use linux/amd64 platform by default on macOS

You can set the environment variable DOCKER_DEFAULT_PLATFORM

export DOCKER_DEFAULT_PLATFORM=linux/amd64  

Cannot install python 3.10.0 on m1 Apple silicon - ld: symbol(s) not found for architecture x86_64

  1. First install gettext:
brew install gettext

  1. Then export flags:
export LDFLAGS="-L/opt/homebrew/lib"; export CPPFLAGS="-I/opt/homebrew/include"

  1. Finaly install python:
pyenv install 3.10.0

It worked for me. I found it here https://github.com/pyenv/pyenv/issues/1877#issuecomment-962514298

Manage multiple python versions on both architectures with M1 mac

Here is a solution that does just that. I hope it's still useful.

Quick summary:

  1. Make sure Rosetta 2 is installed (it translates software designed for x86 to something ARM can digest)
  2. Install a x86 and a ARM version of homebrew
  3. Install a x86 and a ARM version of the packages required by pyenv.
  4. Install pyenv
  5. Use aliases to refer to a x86 and an ARM version of pyenv
  6. Use pyenv-alias to install and refer to x86 and/or ARM python versions.


Related Topics



Leave a reply



Submit