chrisjcc commited on
Commit
15f0a61
·
verified ·
1 Parent(s): 45b8435

Important: MUJOCO_GL must be set before any MuJoCo import. Otherwise, it will still try to use GLFW.

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -1,6 +1,10 @@
 
 
 
1
  import gradio as gr
2
  from tray_sim import run_tray_simulation
3
 
 
4
  def simulate_and_render(seed: int):
5
  gif_path = run_tray_simulation(seed)
6
  return gif_path
 
1
+ import os
2
+ os.environ["MUJOCO_GL"] = "osmesa" # or "egl" if you switch to EGL support
3
+
4
  import gradio as gr
5
  from tray_sim import run_tray_simulation
6
 
7
+
8
  def simulate_and_render(seed: int):
9
  gif_path = run_tray_simulation(seed)
10
  return gif_path