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

Python viewer runs perfectly, but other scripts end with Platform::WindowlessEglApplication::tryCreateContext(): unable to find CUDA device 0 among 2 EGL devices in total WindowlessContext: Unable to create windowless context #2405

Open
emilia-szymanska opened this issue Jun 7, 2024 · 4 comments

Comments

@emilia-szymanska
Copy link

emilia-szymanska commented Jun 7, 2024

At this point I truly do not know what I am doing wrong. I do not have a GPU, but a python example viewer runs perfectly. However, if I try to do anything in another script, it fails with Platform::WindowlessEglApplication::tryCreateContext(): unable to find CUDA device 0 among 2 EGL devices in total WindowlessContext: Unable to create windowless context. I truly do not understand how a fancier script can run without problems, and the following piece breaks:

from typing import Any, Dict
import habitat_sim
from habitat_sim.utils.settings import default_sim_settings, make_cfg

sim_settings: Dict[str, Any] = default_sim_settings
sim_settings["scene"] = "./data/test_assets/scenes/simple_room.glb"
sim_settings["scene_dataset_config_file"] = "default"
sim_settings["enable_physics"] = False
sim_settings["num_environments"] = 1
sim_settings["window_width"] = 800
sim_settings["window_height"] = 600
sim_settings["default_agent_navmesh"] = False
sim_settings["color_sensor"] = True
sim_settings["depth_sensor"] = True
sim_settings["semantic_sensor"] = True

cfg = make_cfg(sim_settings)
sim = habitat_sim.Simulator(cfg)

Please help :(

Specs:

  • Python: 3.9
  • how I installed habitat: conda install habitat-sim withbullet -c conda-forge -c aihabitat
  • system: Ubuntu 22.04
@0mdc
Copy link
Contributor

0mdc commented Jun 10, 2024

That's pretty strange. Your script works on my end.

I do not have a GPU, but a python example viewer runs perfectly.

Which example viewer did you run?

@emilia-szymanska
Copy link
Author

@0mdc I ran examples/viewer.py with exactly this command: python examples/viewer.py --scene path/to/.ply.

@0mdc 0mdc closed this as completed Jun 20, 2024
@emilia-szymanska
Copy link
Author

@0mdc why would you close this issue? It is very far from being solved.

@0mdc 0mdc reopened this Jun 20, 2024
@0mdc
Copy link
Contributor

0mdc commented Jun 20, 2024

My mistake, I closed the wrong one :)

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