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

Running this package headlessly? #16

Open
haudren opened this issue May 6, 2021 · 3 comments
Open

Running this package headlessly? #16

haudren opened this issue May 6, 2021 · 3 comments

Comments

@haudren
Copy link

haudren commented May 6, 2021

Hello,

Is it possible to run this package entirely headlessly? By that I mean on a server machine and without any display connected. I think the use of GLFW makes it difficult, but I was wondering if anyone had run into similar issues.

Maybe it would be useful as well for #13 ?

Thanks!

@marip8
Copy link
Collaborator

marip8 commented May 6, 2021

I haven't ever tried running this package headless, but this GLFW documentation indicates that it's possible to create a context with a hidden window that never gets displayed. This might be close to what you're looking for

@haudren
Copy link
Author

haudren commented May 7, 2021

This is a little bit different: as far as I understand this still creates a window and will crash if there is no display connected.

Indeed this seems to be already set:

glfwWindowHint(GLFW_VISIBLE, false);

But if you run unset DISPLAY to simulate a headless environment, the examples crash with:

terminate called after throwing an instance of 'std::runtime_error'
  what():  Failed to create GLFW window

I will have a look and see if it's possible to replace GLFW with regular EGL, as is done in pyrender.

@haudren
Copy link
Author

haudren commented May 12, 2021

As a follow-up to this issue, I have created a fork here:
https://github.com/ascentai/gl_depth_sim

The main differences are:

This allows to run headlessly, and solves my use case. I'm ready to PR back here, but those are fairly changes, would you be open to merging?

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

2 participants