Fixing MuJoCo Rendering
· 6 min read
You SSH into the server, activate your environment, and run the training script that renders a few evaluation videos. Everything worked perfectly on your laptop. Here, you get something like this:
mujoco.FatalError: gladLoadGL error
or, if you are slightly luckier:
RuntimeError: Failed to initialize EGL display
No GPU is broken. Your driver is fine — nvidia-smi prints a beautiful table. The problem is that MuJoCo wants to render headlessly, and the one small piece of the driver it needs for that is missing from the system. The annoying part is that fixing it normally requires sudo, which you probably do not have on a shared machine.
Good news: you can fix it from your own home directory. This post explains why the error happens and walks through the workaround.