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 for Mac ARM-64 #937

Closed
lfoppiano opened this issue Jul 24, 2022 · 12 comments · Fixed by #975
Closed

Support for Mac ARM-64 #937

lfoppiano opened this issue Jul 24, 2022 · 12 comments · Fixed by #975
Assignees
Labels
macOS-specific Issue visible only on macOS environments need help Issues where the contributors are even more incompetent than usual

Comments

@lfoppiano
Copy link
Collaborator

In this thread we should collect all issues related to MacOS ARM.

In general ARM is not yet supported. Please consider using Docker for the time being (https://grobid.readthedocs.io/en/latest/Grobid-docker/). Performances won't be the same due to the Rosetta interpreter.

Since nobody has a Mac ARM help is more than welcomed.

@lfoppiano lfoppiano added macOS-specific Issue visible only on macOS environments need help Issues where the contributors are even more incompetent than usual labels Jul 24, 2022
@LukasWallrich
Copy link

LukasWallrich commented Oct 3, 2022

Thanks for flagging that this will not work. However, I also can't get the docker to work ...

After downloading the image (docker pull grobid/grobid:0.7.2-SNAPSHOT) I need to remove the GPUs from the command given in the docs for the server to start (docker run --rm --platform=linux/amd64 -p 8070:8070 grobid/grobid:0.7.2-SNAPSHOT). However, in that case, the Docker crashes as soon as TensorFlow is called:

The TensorFlow library was compiled to use AVX instructions, but these aren't available on your machine.
qemu: uncaught target signal 6 (Aborted) - core dumped

That seems to be a common issue ... but are you aware of how to get grobid to work on an M2 mac?

@LukasWallrich
Copy link

Just to note - the CRF-only image works on ARM Docker.

@lfoppiano
Copy link
Collaborator Author

@LukasWallrich the OS of the host machine you tried to run them, was it a macOs or Linux ARM?

@LukasWallrich
Copy link

Mac OS wit M2

@kermitt2
Copy link
Owner

kermitt2 commented Oct 4, 2022

Thank you @LukasWallrich

I am surprised that the current grobid image works on ARM, it should not :)
So I suppose the amd64 image is emulated? which would impact runtime.

My idea was to create multi-arch build images, but I've never tried to do it.
It's also hard to test for me I must say (I only have access to a M1 mac, the one of my wife but she's using it a lot ;).

@lfoppiano
Copy link
Collaborator Author

Yes I think docker has some part that is emulated. We're safe for the moment :-D

@LukasWallrich
Copy link

LukasWallrich commented Oct 4, 2022 via email

@jacksongoode
Copy link

jacksongoode commented Dec 1, 2022

Just to give an update from an M1 Pro user, the only thing that prevented me from running Grobid was libwapiti.dylib, which, once built on my machine, worked

@lfoppiano
Copy link
Collaborator Author

@jacksongoode in which directory did you copied it? Did you override the version under mac-64, under grobid-home/pdfalto?

@jacksongoode
Copy link

grobid-0.7.2/grobid-home/lib/mac-64/libwapiti.dylib

@lfoppiano lfoppiano linked a pull request Dec 1, 2022 that will close this issue
@lfoppiano
Copy link
Collaborator Author

@jacksongoode could you test the PR #975 ?

@jacksongoode
Copy link

@lfoppiano Sure! I'll get to it tomorrow!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
macOS-specific Issue visible only on macOS environments need help Issues where the contributors are even more incompetent than usual
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants