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

Support Docker images for Apple Silicon/M1 arm64 platform #6133

Closed
muthenberg opened this issue Sep 22, 2021 · 10 comments
Closed

Support Docker images for Apple Silicon/M1 arm64 platform #6133

muthenberg opened this issue Sep 22, 2021 · 10 comments

Comments

@muthenberg
Copy link

muthenberg commented Sep 22, 2021

Hi,

Using the latest docker images on my MacBook Pro M1 with Apple Silicon I get the following 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

It seems the image works fine, but I guess it uses Rosetta 2 for amd64 emulation. I would prefer a native image. Are there any plans to support this?

I would be willing to create those images on my machine and provide them to you, if you have no such MacBook. However I do not know, whether this is desired and whether I would be able to build the images. My C++ experience is pretty dated and based on using Visual Studio 6.0.

@hoerup
Copy link
Contributor

hoerup commented Sep 27, 2021

I assume this will depend both on getting GH actions working for building docker image in general ( see #6137 ) AND github adding support for M1 ( actions/runner-images#2187 )

Oh yeah, also needs to have debian support in general for the M1 and having debian generating baseimage for this architecture.

@hoerup
Copy link
Contributor

hoerup commented Oct 12, 2021

@muthenberg I may have misunderstood something
Is M1 a "normal" arm64/arm V8 ??

In that case I guess the GH actions for building cross platform containers could be utilized ?

You could look into creating a PR expanding the current GH actions to support crossplatform

@muthenberg
Copy link
Author

@hoerup That is a good question. I know that M1 has an ARM processor, but I am not very knowledgable about different kinds of those processors. Wikipedia tells me that the instruction set is arm V8.4-A.

If you create such a PR I would be happy to try to run it on my machine and tell you the results.

@SiarheiFedartsou
Copy link
Member

We already build M1 containers on CI, will be available in 5.27.

@Kradenko
Copy link

Hi, would this mean that 5.27 would then also work on Raspberry Pi? If so, when will 5.27 be available?

@SiarheiFedartsou
Copy link
Member

@Kradenko hm, I think so, but it is to be tested. Could you build docker image from master and try? I can provide instructions on how it can be done if needed.

@Kradenko
Copy link

Kradenko commented Sep 25, 2022

@SiarheiFedartsou Please! I have been looking for a howto all day.

@SiarheiFedartsou
Copy link
Member

@SiarheiFedartsou Please! I have been looking for a howto all day.

You can just build Docker image like this:

docker build -t osrm-local --platform arm64 -f docker/Dockerfile .

Then you can just try to run OSRM as usual, but changing osrm/osrm-backend to osrm-local to use image you just built rather then version from Docker Hub. Let me know if it is not clear.

@Kradenko
Copy link

@SiarheiFedartsou Please! I have been looking for a howto all day.

You can just build Docker image like this:

docker build -t osrm-local --platform arm64 -f docker/Dockerfile .

Then you can just try to run OSRM as usual, but changing osrm/osrm-backend to osrm-local to use image you just built rather then version from Docker Hub. Let me know if it is not clear.

Will give it a go later tonight and let you know.

@Kradenko
Copy link

Kradenko commented Oct 20, 2023

Apologies for the incredibly late response. This method has served me very well for using it on the Raspberry Pi.

I only wish we had more memory to run the OSRM on the Pis. Will ask if there is a way to use swap space at some stage. For testing this is fine now.

just to add to that I have placed pre-compiled docker images on my repository here: https://hub.docker.com/r/kradenko/osrm-backend

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

No branches or pull requests

4 participants