3

I am using macOS Monterey Version 12.0.1 with the Apple M1 chip.

I have downloaded the appropriate version of Docker, but when I tried to execute the following in the terminal - I am following some online lectures -

docker run -v $PWD:/usr/local/share/scalar_blocks wlandry/sdpb:2.5.1 scalar_blocks --dim 3 --order 40 --max-derivs 10 --spin-ranges 0-20 --poles 18 --delta-12 0 --delta-34 0 --num-threads=4 -o/usr/local/share/scalar_blocks/output --precision 776

I got a warning

WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested

I have seen this complaint going around online, but there are so many answers that I am not sure which approach is the most resilient with regards to this matter. Any suggestions?

Edit 1: I forgot to mention that I have also installed Rosetta 2.

Edit 2: After the response by @Richardh9935 I updated to Monterey 12.2 but still no luck.

0

2 Answers 2

3

It looks that the problem is not with Docker Desktop nor OS but with the image you're running. Images should be also built for a particular architecture. With the message you see it informs you that the running image will be using translation x86 to M1 architecture.

In order to avoid this you need to build yourself a Docker image using source code of an application or ask a developer to build and post it on Docker Hub.

If you browse to the docker hub page of the image you are running here, have a look at the section "OS/ARCH" it has only "linux/amd64" which is not M1 architecture, for M1 it should be ARM64.

The issue is also mentioned at Docker web site in the "Known issues" section.

0
0

You just need to add a parameter for the platform like this:

docker run -d --name sql_server_test_three \
 -e 'ACCEPT_EULA=Y' \
 -e 'SA_PASSWORD=meowmeow' \
 -p 1433:1433 \
 --platform linux/amd64 \
 mcr.microsoft.com/mssql/server:2022-latest (http://mcr.microsoft.com/mssql/server:2022-latest)

This worked on my 2021 MacBook Pro (Chip Apple M1 Max).

You must log in to answer this question.