-
Notifications
You must be signed in to change notification settings - Fork 428
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
Grobid with DL models natively on MacOS ARM #1108
Comments
For tensorflow on ARM Apple, you should install tensorflow-deps using conda (https://github.com/lfoppiano/material-parsers?tab=readme-ov-file#set-up-on-apple-m1, you can stop before the spacy model download stuff - same scientific approach 😄 ) I use usually Conda and I install most of the packages with pip unless they are particularly annoying (e.g. try to compile -fail - etc...) The JEP library should not need to be copied under the grobid-home because the version in the python env should be used directly. For doing that you should export the equivalent of CONDA_PREFIX directory corresponding to VENV before running grobid. |
Thanks for taking your time. I tried using conda but was not successful. It's the same situation as before. I will continue to use my remote linux machine for now. So feel free to close this issue. Just for the record, here is what I did:
conda create -n grobidEnv python=3.9
conda activate grobidEnv
tensorflow-metal==0.6.0
tensorflow-macos==2.10.0
numpy==1.22.3
transformers==4.29.1
jep==4.2.0
# this is important as v70 is incompatible (https://github.com/pypa/setuptools/issues/4376#issuecomment-2126162839)
setuptools==69.5.1 conda install -c apple tensorflow-deps
pip install -r requirements.macos.txt
conda install scikit-learn=1.0.1
diff --git a/setup.py b/setup.py
index 456da4c..8145d05 100644
--- a/setup.py
+++ b/setup.py
@@ -15,20 +15,15 @@ setup(
install_requires=[
'numpy==1.22.3',
'regex==2021.11.10',
- 'scikit-learn==1.0.1',
'tqdm==4.62.3',
- 'tensorflow==2.9.3',
- 'h5py==3.6.0',
'unidecode==1.3.2',
'pydot==1.4.0',
'lmdb==1.2.1',
- 'transformers==4.25.1',
'torch==1.10.1',
'truecase',
'requests>=2.20',
],
classifiers=[
"Programming Language :: Python :: 3.8",
Error:
Adding the jep dir back to the java.library.path or copying the lib as before results in the same situation as in the original comment. (Jep init failed) |
This is my attempt to use grobid on MacOS ARM. The docs state that MacOS is not fully supported so feel free to mark this issue as out of scope.
If anybody got it working, I would be interested in the package versions used.
Here I document what I tried and how far I got:
System
MacOS
14.4.1
(ARM M3)java --version
Steps
Output/Error
Used patches (in case the pastebin is unavailable)
grobidConf.patch
delftMacArm.patch
The text was updated successfully, but these errors were encountered: