Closed boldtrn closed 2 years ago
I dont think it is possible to run on arm quite yet. this relies on maplibre-native binaries, which right now are only generated for Ubuntu 20.04 X64 and macos 12 X64.. without those binaries the build of tileserver will fail.
in the maplibre-native github, we plan to eventually build some m1 binaries, so eventually it should work once we get thise binaries made.
unfortunately, github has no arm64 m1 runners yet, so i have no way to generate the binaries in my @acalcutt\maplibre-native.
in the official repo they have a aws m1 runner, so it should be possible to generate them there.
If you look at the workflow we are working on at https://github.com/maplibre/maplibre-gl-native/pull/459 you can see the steps needed to build the arm64 binaries.
although looking at your error, it doesn't look like canvas is ready yet either. i wonder if the latest canvas can get past that particular error.
Huh, this is actually one I hadn't considered...for supporting tileserver-gl inside a docker container on M1, I guess we'd need linux-arm64
as well as darwin-arm64
...
It looks like it could be possible to force docker to build a x64 image instead of letting it default to arm64. https://www.reddit.com/r/docker/comments/qyzwxo/limitations_on_docker_on_apple_m1_apple_silicon/
Maybe something like docker buildx build --platform linux/amd64 -t tileserver-gl .
Thanks for doing that much reasearch! I knew about the --platform
flag, but I wasn't aware that there is a separate build command buildx
which supports building a different platform. So with this command it's possible to build an amd64 image locally and the build works fine and I can run the container.
So that worked, awesome. buildx is new to me too, but all the examples I saw that used --platform seemed to use it, so it was a good guess...haha
I have added arm64 maplibre binaries to my tileserver-gl release, so it should no longer require compiling at x64 to run.
I just tried to run tileserver-gl locally without Docker. Building the Docker image locally also failed.
For the local run, I think I would have to install quite a lot of dependencies, so it would be great if the docker build would work. (MacOS doesn't include X11 by default)
The Docker build failed as well. I think this is because I am on a machine with ARM CPU (Apple Silicon).
I was running the Docker build with: