Skip to content

Support for Apple ARM M1 #975

Merged
lfoppiano merged 3 commits intomasterfrom
feature/support-mac-arm
Feb 9, 2023
Merged

Support for Apple ARM M1 #975
lfoppiano merged 3 commits intomasterfrom
feature/support-mac-arm

Conversation

@lfoppiano
Copy link
Copy Markdown
Member

This PR add the following:

  • add the rebuilt binaries of pdfalto, wapiti and jep, for Mac ARM architecture
  • fix path construction to select the ARM architecture properly

@lfoppiano lfoppiano linked an issue Dec 1, 2022 that may be closed by this pull request
@lfoppiano lfoppiano mentioned this pull request Dec 1, 2022
@lfoppiano
Copy link
Copy Markdown
Member Author

I did not test JEP.

@jacksongoode
Copy link
Copy Markdown

jacksongoode commented Dec 5, 2022

Looks good to me! Installed and ran Grobid's test and all pasted on an M1 Pro.

@lfoppiano
Copy link
Copy Markdown
Member Author

lfoppiano commented Dec 6, 2022

I found that that depending on the JVM there might be a problem when recognizing the architecture.
This will probably happen when people use JDK 8 which does not have a build on arm.

The problem is easily identifiable by listing the JVMs:

(jep) Lucas-M1-MacBook-Pro:pdfalto lfoppiano$ /usr/libexec/java_home -V
Matching Java Virtual Machines (5):
    19.0.1 (arm64) "Eclipse Adoptium" - "OpenJDK 19.0.1" /Library/Java/JavaVirtualMachines/temurin-19.jdk/Contents/Home
    17.0.5 (arm64) "Eclipse Adoptium" - "OpenJDK 17.0.5" /Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home
    11.0.17 (arm64) "Eclipse Adoptium" - "OpenJDK 11.0.17" /Library/Java/JavaVirtualMachines/temurin-11.jdk/Contents/Home
    1.8.202.03 (x86_64) "Oracle Corporation" - "Java" /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home
    1.8.0_352 (x86_64) "Eclipse Temurin" - "Eclipse Temurin 8" /Library/Java/JavaVirtualMachines/temurin-8.jdk/Contents/Home

and the 1.8 version are x86_64.

I just remove them to avoid future problems

https://stackoverflow.com/questions/19039752/removing-java-8-jdk-from-mac

@lfoppiano
Copy link
Copy Markdown
Member Author

lfoppiano commented Dec 6, 2022

I've done some tests:

  • external models: grobid-quantities, grobid-superconductors work fine
  • tested with JEP and Delft work but I had to remove jep from the grobid-home (below the procedure to install, which is off topic here but I need to write it down before I forget)
conda create --name jep python=3.9 pip
conda activate jep
conda install -c apple tensorflow-deps -y
which pip
pip install tensorflow-macos
pip install tensorflow-metal
pip install jep
pip install -r ../../delft/requirements.txt
pip3 install numpy --upgrade

@jacksongoode
Copy link
Copy Markdown

Is there something blocking this merge that I could help to test?

@lfoppiano lfoppiano added this to the 0.7.3 milestone Feb 8, 2023
@lfoppiano lfoppiano merged commit 4d86a79 into master Feb 9, 2023
@lfoppiano lfoppiano deleted the feature/support-mac-arm branch February 9, 2023 08:24
jacksongoode added a commit to jacksongoode/NIME-proceedings-analyzer that referenced this pull request Apr 22, 2024
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

Successfully merging this pull request may close these issues.

Support for Mac ARM-64

2 participants