softcite / software-mentions

Softcite software mention recognizer, finding mentions and citations to software from within the academic literature
Apache License 2.0
68 stars 11 forks source link

efforts towards building aarch64 grobid #30

Open jameshowison opened 1 year ago

jameshowison commented 1 year ago

Just a place to put my halting efforts to get this running on m1 silicon. See https://github.com/softcite/software-mentions/issues/29

This seems to build well using:

docker build --platform=linux/aarch64 -t grobid/software-mentions:0.8.0-SNAPSHOT-aarch64 --build-arg GROBID_VERSION=0.8.0-SNAPSHOT-aarch64 --file Dockerfile.software .

Note that the Dockerfile also builds DeLFT from a fork (I had to adjust the dependencies of DeLFT to have the build work).

(the software-mentions folder needs to be inside a grobid clone, then the Dockerfile.software copied to the grobid clone directory).

Unfortunately actually attempting to run the image produces this error:

screenit-softcite-server_software_mentions-1  | INFO  [2023-08-01 19:34:43,591] com.hubspot.dropwizard.guicier.DropwizardModule: Added guice injected health check: org.grobid.service.controller.HealthCheck
screenit-softcite-server_software_mentions-1  | com.google.inject.CreationException: Unable to create injector, see the following errors:
screenit-softcite-server_software_mentions-1  | 
screenit-softcite-server_software_mentions-1  | 1) Error injecting constructor, java.lang.UnsatisfiedLinkError: /opt/grobid/grobid-home/lib/lin-64/libwapiti.so: /opt/grobid/grobid-home/lib/lin-64/libwapiti.so: cannot open shared object file: No such file or directory (Possible cause: can't load AMD 64 .so on a AARCH64 platform)
screenit-softcite-server_software_mentions-1  |   at org.grobid.service.GrobidEngineInitialiser.<init>(GrobidEngineInitialiser.java:29)

The right library for aarch64 is actually in

jlh5498@INFO-A64206 grobid % ls grobid-home/lib/mac_arm-64 
libwapiti.dylib

So next step would be figuring out how to specify the right path for that java library to be loaded.