Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

How to default to EGL on GPU and OSMESA on CPU?

Abierto
#419 0 comentarios 4 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
python

Línea de trabajo

Comienza rastreando cómo se selecciona la preferencia de backend entre GLFW, EGL y OSMESA, y cómo se gestiona MUJOCO_GL. Compara opciones para establecer un orden de backends configurable o valores predeterminados conscientes de la GPU; después, verifica que las máquinas con GPU elijan EGL headless, mientras que las máquinas que solo tienen CPU recurran a OSMESA sin requerir ninguna configuración del entorno del usuario.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Right now, the preference order is glfw > egl > osmesa. In the common scenario of training an RL agent on a GPU machine, this means windows will pop up, which is typically not desired. I could also pin os.environ['MUJOCO_GL'] = 'egl' in my code to avoid this behavior. However, then the code will crash when running on a CPU-only machine.

Is there any way to set up my RL training code so that it will do headless rendering on GPU but osmesa on CPU, skipping the glfw backend? The goal here is for my RL training code to work out of the box when other people run it, without them having to set up their own env variable.

The potential workarounds I can think of all have their own downsides:

  • Detecting whether the machine has a GPU by asking the deep learning framework, to only set the backend to EGL if a GPU is available: This would require importing JAX inside the env processes and hog GPU memory.
  • Detecting whether the machine has a GPU by checking for common executable like nvcc or nvidia-smi: This doesn't work in many server environments (including internally at Google), where those binaries aren't available at runtime.

If DMC would just allow specifying a preference order for the backends or change the default to favor EGL over GLFW, that would simplify things a lot.

Lenguaje dominante
Python
Estrellas
4.7k
Forks
765
Métricas de merge de PR
Sin PR fusionados en 30 d

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de google-deepmind/dm_control

Todos los issues de google-deepmind/dm_control

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.