facebookresearch / habitat-sim

A flexible, high-performance 3D simulator for Embodied AI research.
https://aihabitat.org/
MIT License
2.57k stars 416 forks source link

Platform::WindowlessEglApplication::tryCreateContext(): unable to find CUDA device 0 among 2 EGL devices in total #2424

Open 28dvd28 opened 2 months ago

28dvd28 commented 2 months ago

Hello, I'm trying to use habitat-sim for my project, but when i'm running it i'm getting the error: Platform::WindowlessEglApplication::tryCreateContext(): unable to find CUDA device 0 among 2 EGL devices in total I've looked in some other already opened issue, but I can't find a solution, maybe also because i'm working on a WSL and not directly on linux machine.

The fact that i am using the WSL can it be the reason of why I'm getting the error? If yes can you help me solving this?

aclegg3 commented 2 months ago

Hey @28dvd28

I assume this can work, but it sounds like you'll need to do some work to expose and setup the GPU correctly.

I saw this: https://canonical-ubuntu-wsl.readthedocs-hosted.com/en/latest/tutorials/gpu-cuda/

Also take a look at our troubleshooting guide for graphics issues.

Once you've dug in a bit and can provide some more info maybe myself or @0mdc can help with any questions.

28dvd28 commented 2 months ago

Hello,

many thanks for the resources that you gave me.

I've looked at both the link that you have sent to me. From the first one I have a question. I need to download the nvidia driver for windows. But i've already done it for gaming, so i downloaded the game ready driver (I think, it has been i while). Do I need to download the Studio Driver?

I've looked to the second link and i've followed the instruction, but i don't know if i have the right output, so:

In any case i am still having the issue also testing it in the habitat-lab reposotory with the command python examples/example.py. Hope you will be able to help me.

Kind regards

wsychiu commented 2 weeks ago

Hello @28dvd28 - did you managed to find a fix for this? I am literally having the same issue as you are.

I can run the provided example examples/viewer.py with the skokloster-castle.glb example, but cannot get it to work with Matterport3D dataset (after following the Matterport3D instructions).

nvidia-smi and nvcc --version are all returning up-to-date drivers and toolkit. I also get the same eglinfo: eglInitialize failed after a wall of text.

Hoping someone has a fix as I can't seem to find many solved problems online...

28dvd28 commented 2 weeks ago

Hello @wsychiu, I wasn't able to solve this issue, I think that maybe for some strange reason it is needed a full Linux OS on your machine and with just the WSL, for some strange reason, it is not working.

wsychiu commented 2 weeks ago

Thanks @28dvd28 - did you get it working on a full Linux install?

28dvd28 commented 2 weeks ago

@wsychiu - Since it was a school project, I thought that it was too much effort change the OS of my PC, so i did not go on trying to solve it, but the PhD student, that was following me on this project, used a Linux OS and on his PC everything worked fine.