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
EGL initialization error #123
Comments
Try to do $ export DISPLAY=:0 in your terminal and try again, it works for me. |
@xinleipan In this case, I'm trying to use EGL for headless rendering. Setting "DISPLAY=:0" results in the below error. Are you rendering with glfw or osmesa?
|
I'm not sure, sorry. Maybe it's GLFW, I just installed MuJoCo normally with a Ubuntu 16.04 machine, CUDA 8.0 and NVIDIA GPU. |
same issue here on a ubuntu box. |
Problem solved, use this: @ajabri
In order to avoid the EGL, one way I have seen working is to use the |
I need headless rendering, so I need to use EGL as my rendering backend.
The same code worked on another machine, the only difference being (I
believe) that the machine on which I obtain the above error has a much more
recent nvidia driver (440 vs 390).
|
@ajabri if X display is not available, you can use "osmesa" backend. (for the interest of others: won't work even if you install Xvfb and GLFW because they require X-display)
Here is the full setup for a headless linux box with no built-in X display: export MUJOCO_GL=osmesa
export MJLIB_PATH=$HOME/.mujoco/mujoco200/bin/libmujoco200.so
export MJKEY_PATH=$HOME/.mujoco/mujoco200/mjkey.txt
export LD_LIBRARY_PATH=$HOME/.mujoco/mujoco200/bin:$LD_LIBRARY_PATH
export MUJOCO_PY_MJPRO_PATH=$HOME/.mujoco/mujoco200/
export MUJOCO_PY_MJKEY_PATH=$HOME/.mujoco/mujoco200/mjkey.txt @saran-t maybe we can add this to the documentation? :) |
Hmmm, EGL should allow for hardware accelerated headless rendering without
X display. Has worked properly for me in the past. Will look into other differences of current setup.
|
Maybe we can ping @saran-t about that |
This way exactly solve me from those terrible mistakes |
I can't see how a CUDA upgrade could have changed anything given that we are specifying the argument types ourselves, but one thing that you could try is to change this line https://github.com/deepmind/dm_control/blob/master/dm_control/_render/pyopengl/egl_ext.py#L65 to
Let me know if this works. |
The above change gives me the following error:
|
I think this was due to an upstream change in PyOpenGL. In versions newer than 3.1.4, |
Thank you @alimuldal! |
I am new to this. |
So I just spent hours on this, and I'm not an expert, so I might say something wrong. But, in my case, I was trying to run it over SSH, so I suspect that's what caused the headless display to not work. So, I tried switching the backend, but |
Hi,
I've recently come across the following error, on a machine with Nvidia driver version: 440.33.01 CUDA version: 10.2, when trying to use EGL for headless rendering. The same exact code was running properly on a machine with CUDA Version 10.1 and driver version 390.
Any idea how to fix the issue? I've tried reinstalling dm_control with pip.
Thanks,
A
The text was updated successfully, but these errors were encountered: