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

ARM compatible image #965

Open
morucci opened this issue Oct 5, 2022 · 14 comments
Open

ARM compatible image #965

morucci opened this issue Oct 5, 2022 · 14 comments

Comments

@morucci
Copy link
Collaborator

morucci commented Oct 5, 2022

Users relying on new Mac books are unable to run the Monocle compose. Indeed the Monocle container image is only compatible with x86_64 / amd64 architecture.

This issue is the place to discuss solutions such as:

  • Produce an ARM compatible image
  • Document a workaround
@morucci
Copy link
Collaborator Author

morucci commented Oct 5, 2022

It seems that a workaround solution could be to set export DOCKER_DEFAULT_PLATFORM=linux/amd64 to add a layer of emulation for Docker.

@kartikeyrajvaidya
Copy link

this didn't work for me

@morucci
Copy link
Collaborator Author

morucci commented Oct 6, 2022

Unfortunately I don't have such platform to test it. Perhaps you could share the error you get ?

The other solution might be the full virtualization where you could start a compatible system then start Monocle.

@charlesdg
Copy link

No specific logs on the errors.

Message I get during the launch:

[+] Running 4/6
 ⠿ Network monocle_default                                                                                                                                Created      0.1s
 ⠿ Container monocle-elastic-1                                                                                                                            Started      1.0s
 ⠿ Container monocle-api-1                                                                                                                                Started      1.2s
 ⠸ api The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested                  0.0s
 ⠿ Container monocle-crawler-1                                                                                                                            Started      2.3s
 ⠹ crawler The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested              0.0s

And in the logs:

monocle-api-1 exited with code 137
monocle-crawler-1 exited with code 0
monocle-api-1 exited with code 0
monocle-crawler-1 exited with code 0
monocle-api-1 exited with code 0
monocle-crawler-1 exited with code 0
monocle-api-1 exited with code 137
monocle-crawler-1 exited with code 137

@JohnFlyIII
Copy link

Same issue here so a +1 from me.

M1 Mac user

I'm going to try and work on alternatives, maybe just host in AWS as the product looks like what I need.

same results and no logs to speak of.

@charlesdg
Copy link

I succeeded to make it work by

  • adding more RAM (from 8 to 16gb to docker). The error with code 137 seems to not be present anymore (137 was a OOM error).
  • adding ingest.geoip.downloader.enabled: false to elastic/environment entry in the docker-compose file.

@sourceful-karlson
Copy link

@charlesdg can you post your setup in PR or something?

Copy link

Found a solution by running Docker Desktop with Rosetta enabled (had the first idea from ChatGPT).
It's under Beta features in the latest docker desktop version as of today, but it seems to work.

@farkmarnum
Copy link

+1 to using Rosetta in Docker Desktop — this unblocked me

@wjamro
Copy link

wjamro commented Sep 6, 2023

I managed to run Monocle on M1 Mac using the tips above:

  1. Install Rosetta -> softwareupdate --install-rosetta
  2. Increase memory in Docker Desktop (v4.22.1) to 16GB
  3. export DOCKER_DEFAULT_PLATFORM=linux/amd64

@MisterJimson
Copy link

Where would I set export DOCKER_DEFAULT_PLATFORM=linux/amd64?

@mrdaliri
Copy link

@MisterJimson you can run it in your terminal session before starting monocle (docker-compose up -d)

@dougch
Copy link

dougch commented Dec 4, 2024

This is an x86 specific project... The flake calls out x86 in the devShell, and the upstream container has x86 binaries... when I try to start this in an Arm env, I get:

api-1      | exec /bin/monocle: exec format error
crawler-1  | exec /bin/monocle: exec format error

If you're on Linux and don't have Rosetta, another option might be, for those with KVM, is docker with QEMU, but otherwise, even building the container will take some work on Arm.

@TristanCacqueray
Copy link
Contributor

Note that running monocle from source should work on ARM (see the toolchain supported platforms here). With cabal and ghc, you can follow https://github.com/change-metrics/monocle/blob/master/CONTRIBUTING.md#build-using-cabal

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