How to default to EGL on GPU and OSMESA on CPU?
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- python
调研方向
首先追踪 GLFW、EGL 和 OSMESA 后端的优先级是如何选择的,以及 MUJOCO_GL 是如何处理的。比较可配置后端顺序或基于 GPU 的默认设置方案,然后验证配备 GPU 的机器会选择 headless EGL,而仅有 CPU 的机器会回退到 OSMESA,且不需要用户设置环境。
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- Python
- 星标
- 4.7k
- 派生
- 765
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
google-deepmind/dm_control 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 76/100
google-deepmind/dm_control#552 ·
-
难度 3/5 1-2 天 新手友好度 45/100
google-deepmind/dm_control#540 · 1 条评论 ·
-
难度 3/5 1-2 天 新手友好度 55/100
google-deepmind/dm_control#537 · 1 条评论 ·
-
难度 3/5 1-2 天 新手友好度 45/100
google-deepmind/dm_control#529 ·
-
难度 5/5 一周以上 新手友好度 25/100
google-deepmind/dm_control#527 · 1 条评论 ·
查看 google-deepmind/dm_control 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 75/100
anthropics/skills#1811 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
speaches-ai/speaches#678 ·
-
bug
难度 2/5 1-3 小时 新手友好度 75/100
datalayer/mcp-compose#42 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
conda-forge/spacy-feedstock#177 ·
-
难度 2/5 1-3 小时 新手友好度 70/100
UKGovernmentBEIS/inspect_evals#2523 ·