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

Add Java JVM and MaxEnt model application to EOXHub #36

Open
robknapen opened this issue Jan 16, 2024 · 16 comments
Open

Add Java JVM and MaxEnt model application to EOXHub #36

robknapen opened this issue Jan 16, 2024 · 16 comments
Assignees

Comments

@robknapen
Copy link

For our use case we want to run the Java-based MaxEnt model for species distribution modelling. It can be used directly from the command line, without using the graphical user interface of the program.

The MaxEnt model is open source and available here:
https://biodiversityinformatics.amnh.org/open_source/maxent/

However since it is a Java based application, it also requires a Java JVM to be available.

Is it possible to include both into the/a fairicube server on eoxhub? The current one that I can start (which has the PyTorch packages as well) does not have Java installed and it does not allow me to self-install programs.

@robknapen
Copy link
Author

It should work with a recent (open) JDK, like Temurin 21.0.1.

@eox-cs1
Copy link

eox-cs1 commented Jan 16, 2024

Response from Hub Team:
can you please get it packaged as docker container together with an example config how to invoke it, then we can have a look on it on how to deploy it at the Hub

@robknapen
Copy link
Author

Ok, I will add that to my list to look into.

@robknapen robknapen changed the title Add Java JVM and MaxEnt application to EOXHub server, e.g. the one for UC2 with PyTorch Add Java JVM and MaxEnt model application to EOXHub Jan 17, 2024
@robknapen robknapen self-assigned this Jan 17, 2024
@robknapen
Copy link
Author

Creating a Docker container with Java and the MaxEnt model should be doable, but will take some effort from us to figure it out and how to create a usable container. It would e.g. need terminal access to run the maxent commands, and a data volume to share the input and output data of the model.

Before investing further UC time in this we decided to evaluate the MaxEnt model further locally first, and when we decide it is the best suitable species distribution model for our use case we will look into containerising it.

@robknapen
Copy link
Author

Closing issue for now, until local testing has been completed.

@jetschny
Copy link

as now also UC1 required Maxent for its work, I re-open the issue...

@eox-cs1
Copy link

eox-cs1 commented Aug 12, 2024

@robknapen
Hi Rob, what was the outcome of your experiments with containerizing Java & Maxent

@robknapen
Copy link
Author

@eox-cs1 I experimented briefly with it hoping to use it purely as a command line based application, but it very quickly pops up dialogs on the screen, e.g. with error messages and an 'ok' button to click. It also likes to display charts etc. It is very much a Java Desktop application. Maybe using X11 the display can be forward to an X client on a laptop so that application can be used that way.

But that is where I stopped spending time on it and considered that it might be more useful for our use case to try to find an alternative maximum entropy model implementation for Python or R, or even another way to do the species distribution modelling we need (e.g. with a random forest model). Or run the Java MaxEnt application locally if there are no other options.

@eox-cs1
Copy link

eox-cs1 commented Aug 26, 2024

@robknapen thanks for sharing your findings.
Do I understand correctly that even the command line based application doesn't work without GUI ?

@robknapen
Copy link
Author

Perhaps if everything is perfect :-) But it is a desktop application so very likely that many things will cause GUI dialog boxes and windows to be shown for the user to interact with. I think otherwise in the many years that it exists someone would already have put it on a server or in a container. Unless its license even doesn't allow that, which would also be an issue.

@eox-cs1
Copy link

eox-cs1 commented Aug 26, 2024

Thanks.
Just checked: the license is MIT, so no problem from this side.
But overall, this doesn't sound very promising.

@robknapen
Copy link
Author

Thanks for checking. And indeed, it is probably not very suitable to be run as a container. Maybe with the X11 forwarding of the display, but that would be cumbersome and not for the average Windows user I guess. You would want something that can do long-running computations in the background without a change of it popping up GUI stuff and waiting for a response.

@mari-s4e
Copy link

Hi @robknapen,

have you looked into these two Python implementations of MaxEnt?

@robknapen
Copy link
Author

Hi @mari-s4e ,

I have suggested elapid as an alternative, but I don't know if anyone has actually tried it yet. This is mostly a question for @vittekm and Masoume who are doing the species distribution modelling and looking into the models. So I am hoping to hear from them :-)

@vittekm
Copy link

vittekm commented Sep 2, 2024

Hi @robknapen and @mari-s4e,
Let's make an overview of knowledge gained so far about the MaxEnt implementation. I created an issue in the common code section: FAIRiCUBE/common-code#9 (comment)

@eox-cs1
Copy link

eox-cs1 commented Sep 2, 2024

@mari-s4e @robknapen @vittekm
since running Maxent on FiC-Hub is not a real option, how shall we proceed ?

I elapid (https://pypi.org/project/elapid/) or the 2 python versions (see above #36 (comment)) an option you can go with?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants