NVlabs / nvdiffrast

Nvdiffrast - Modular Primitives for High-Performance Differentiable Rendering
Other
1.31k stars 139 forks source link

[F glutil.cpp:338] eglInitialize() failed #58

Closed BianFeiHu closed 2 years ago

BianFeiHu commented 2 years ago

Thanks for this amazing tool. i was using docker and after execute ./run_sample.sh ./samples/torch/cube.py --resolution 32, i encounter this error [F glutil.cpp:338] eglInitialize() failed And my gpu is RTX3080 image

s-laine commented 2 years ago

This has previously indicated a driver issue, see here and here. Note that a reboot is probably required after installing the drivers (#24).

BianFeiHu commented 2 years ago

Thanks a lot and this solution definitely solved my problem

jby1993 commented 2 years ago

@BianFeiHu Hi, I have met the same problem. In my host environment, I can use nvdiffrast normally. But in docker, this error happens. I want to know how you solved this problem? Did you reinstall the driver?

BianFeiHu commented 2 years ago

@jby1993 Yes, I reinstalled the driver with OpenGL.

FarisHijazi commented 1 year ago

I fixed it simply with replacing dr.RasterizeGLContext with dr.RasterizeCudaContext

I was using the nvdiffrec repo

Walterkd commented 1 year ago

which file should I edit? "replacing dr.RasterizeGLContext with dr.RasterizeCudaContext"

YuQiao0303 commented 1 year ago

which file should I edit? "replacing dr.RasterizeGLContext with dr.RasterizeCudaContext"

@Walterkd You can search your code for 'RasterizeGLContext ' if possible, and you may see something like 'dr.RasterizeGLContext' where 'dr' was 'import nvdiffrast.torch as dr'

Larerr commented 2 months ago

I fixed it simply with replacing dr.RasterizeGLContext with dr.RasterizeCudaContext

I was using the nvdiffrec repo

niubi!

gameveloster commented 1 month ago

I'm getting the same error in a Docker container based on pytorch/pytorch:1.11.0-cuda11.3-cudnn8-runtime, but not in the host.

The installed version of nvdiffrast is on the Jun 30 2023 commit c5caf7bdb8a2448acc491a9faa47753972edd380

Anyone knows how to fix this error [F glutil.cpp:338] eglInitialize() failed when running from inside the Docker container?

@jby1993 @BianFeiHu How did you install the nvidia driver with OpenGL in the docker container? How did you restart the container?

@Larerr @FarisHijazi

s-laine commented 1 month ago

@gameveloster Have you checked the example Docker setup here? It's a little out of date, but includes non-obvious steps that were necessary to make EGL available in the container.

Of course, things may have changed so that the required setup is now different. In that case I don't have an answer for you, unfortunately.