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

Opening IPC Server from Python #2

Open
ghost opened this issue Jul 2, 2019 · 3 comments
Open

Opening IPC Server from Python #2

ghost opened this issue Jul 2, 2019 · 3 comments
Labels
enhancement New feature or request

Comments

@ghost
Copy link

ghost commented Jul 2, 2019

Is there a way to start the IPC Server in OpenLCA without using the GUI but from a python console?

Thanks so much!

@clementbrizard
Copy link

@msrocka any update on this topic ?

@msrocka
Copy link
Member

msrocka commented Mar 6, 2020

The IPC server package has a Main class so yes you can start it without the GUI. Also, openLCA comes with an embedded Java runtime so you could run the following script in the openLCA installation folder in Windows to start the IPC server:

rem the path to the database
set db=C:\Users\ms\openLCA-data-1.4\databases\ecoinvent_2_2_unit

rem the Java executable
set java_exec=.\jre\bin\java.exe

rem the installation folders with the openLCA modules
set cp=.\plugins\olca-app_1.10.2\libs\*

%java_exec% -cp %cp% org.openlca.ipc.Main -port 8080 -db %db%

(for Linux and macOS it would be equivalent). You can execute these commands of course also from Python using the process API. However, it is currently not possible to load the native calculation libraries via this startup command, so calculation would be slow... but the rest should work.

@msrocka msrocka added the enhancement New feature or request label Mar 6, 2020
@R-Hammer
Copy link

Are they any new updates on this to use the calculations?
I would like to run all of this on a linux server with out a GUI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants