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

add native arm image #724

Closed
realies opened this issue Sep 1, 2022 · 12 comments
Closed

add native arm image #724

realies opened this issue Sep 1, 2022 · 12 comments

Comments

@realies
Copy link

realies commented Sep 1, 2022

currently, it seems like elasticmq-native runs through qemu-x86_64 on arm, could this be made into a native image? it would really benefit laptop development and battery life, since it currently takes about 10-20% cpu with a light polling client

@micossow
Copy link
Contributor

micossow commented Nov 1, 2022

Continuation of #473

@realies
Copy link
Author

realies commented Nov 1, 2022

thanks @micossow, as I mentioned there, there's darwin aarch64 support over at https://github.com/graalvm/graalvm-ce-dev-builds/releases now, could m1 arm native elasticmq-native images be a thing with it?

@micossow
Copy link
Contributor

micossow commented Nov 1, 2022

It's probably doable, but there seem to be some limitations in the sbt plugin we use: https://github.com/sbt/sbt-native-packager
See: #473 (comment)

@micossow
Copy link
Contributor

It should be possible to build such image now, see: sbt/sbt-native-packager#1503
Some changes in build.sbt are probably also necessary.

@fvasco
Copy link

fvasco commented Mar 23, 2023

I tested the image softwaremill/elasticmq-native:1.3.14 on a Graviton AWS server, but it does not work

# docker run softwaremill/elasticmq-native:1.3.14
Unable to find image 'softwaremill/elasticmq-native:1.3.14' locally
1.3.14: Pulling from softwaremill/elasticmq-native
Digest: sha256:c251751b5d668033c69494ff37a938f977397ad3c806085e53f269bedb2c3ead
Status: Downloaded newer image for softwaremill/elasticmq-native:1.3.14
[FATAL tini (7)] exec /opt/docker/bin/elasticmq-native-server failed: Exec format error

The executable in the image is in amd64 format

file opt/docker/bin/elasticmq-native-server
opt/docker/bin/elasticmq-native-server: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), statically linked, for GNU/Linux 3.2.0, BuildID[sha1]=2ad8fd7fe117da1b01aea2b469d54497c42743d3, with debug_info, not stripped, too many notes (256)

Other files look for aarch64 architecture.

@kderholtvisma
Copy link

Will this be fixed? or is there a quick way of building this from the repo manually?

@micossow
Copy link
Contributor

micossow commented Aug 11, 2023

If you need docker image locally, you can run sbt "project nativeServer; clean; assembly; graalvm-native-image:packageBin; docker:publishLocal" on your ARM64 system.

To be able to create native docker images as a part of GH workflow, we need either:

@diegobfernandez
Copy link

GitHub released a MacOS builder which is M1 based.
Could that be used for ARM64 builds?

@adamw
Copy link
Member

adamw commented Oct 10, 2023

@diegobfernandez Interesting - if we only use it for releases, it might not be that expensive (hopefully in the order of a couple of dollars)

@micossow
Copy link
Contributor

Hello, I updated build.sbt to use buildx supported image creation, which should create proper native images for both x64 and ARM. Please test if softwaremill/elasticmq-native:1.4.5-RC1 image works on your ARM machines. If yes, I'll create a release next week.

@micossow
Copy link
Contributor

Update: softwaremill/elasticmq-native:1.4.5-RC2 has a fix for UI.

@micossow
Copy link
Contributor

Fixed in https://github.com/softwaremill/elasticmq/releases/tag/v1.4.6

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

6 participants