monocle icon indicating copy to clipboard operation
monocle copied to clipboard

ARM compatible image

Open morucci opened this issue 3 years ago • 14 comments

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 avatar Oct 05 '22 07:10 morucci

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

morucci avatar Oct 05 '22 08:10 morucci

this didn't work for me

kartikeyrajvaidya avatar Oct 06 '22 04:10 kartikeyrajvaidya

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.

morucci avatar Oct 06 '22 07:10 morucci

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

charlesdg avatar Feb 24 '23 09:02 charlesdg

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.

JohnFlyIII avatar Mar 28 '23 20:03 JohnFlyIII

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.

charlesdg avatar Mar 29 '23 09:03 charlesdg

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

sourceful-karlson avatar Apr 03 '23 12:04 sourceful-karlson

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.

3B00D avatar Jun 03 '23 23:06 3B00D

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

farkmarnum avatar Jun 08 '23 15:06 farkmarnum

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

wjamro avatar Sep 06 '23 14:09 wjamro

Where would I set export DOCKER_DEFAULT_PLATFORM=linux/amd64?

MisterJimson avatar Sep 27 '23 20:09 MisterJimson

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

mrdaliri avatar Sep 29 '23 16:09 mrdaliri