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

JEP embedded native library #689

Open
kermitt2 opened this issue Jan 2, 2021 · 1 comment
Open

JEP embedded native library #689

kermitt2 opened this issue Jan 2, 2021 · 1 comment
Assignees

Comments

@kermitt2
Copy link
Owner

kermitt2 commented Jan 2, 2021

Currently the JEP native libraries coming with grobid depend simply on the OS and arch. 32/64 bits, but this is not enough because this built library also depends on the version of the JRE used to run Grobid and the version of python installed locally (to run DeLFT). If we want to still embed JEP in GROBID to have the Deep Learning models working "out-of-the-box" we will need to add native libraries for all these variations, or to limit the supported versions of Java and Python.

Right now only the native JEP library for Java 8 and python 3.6 is shipped with Grobid for Lin64 and MacOS.

@de-code
Copy link
Collaborator

de-code commented Jan 8, 2021

Just some feedback from my side.

I am using sciencebeam-trainer-delft.
I am using regular pip to install dependencies, including jep. The version of jep needs to match the one used in GROBID.
Installing jep will also build the binary, using the already installed default Java version (JDK).
I am then making sure, that the path to the JEP binary is in LD_LIBRARY_PATH (e.g. LD_LIBRARY_PATH=venv/lib/python3/site-packages/jep).

That has worked relatively smoothly for me. The pre-build JEP binary within GROBID was not helpful so far for me due to the dependencies that you mentioned.

When deployed, I am using the Docker image built by sciencebeam-trainer-delft. That obviously contains everything, including Java, Python and the JEP binary.

i.e. Docker is a way of providing those things together. There are other formats that could work similar, e.g. AppImage for Linux.

When installing jep via pip it currently does require the JDK to be installed. I guess it could have provided pre-build binaries. It feels like attempting to include all supported JEP versions in GROBID is something that would rather fit into the scope of JEP. But there are probably too many variables to make that smooth.

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

No branches or pull requests

3 participants