Run EvoGym in headless mode
mainEvoGym runs in headless mode by default. To ensure you do not trigger rendering library initialization on a server without a display, follow these patterns:
Using the Gymnasium API:
Set render_mode=None (which is the default).
env = gym.make('Walker-v0', body=body, render_mode=None)Using the low-level API:
Avoid calling EvoViewer.render().
# Do NOT call viewer.render('img') if you want to stay headless
world = EvoWorld.from_json(os.path.join('world_data', 'simple_environment.json'))
sim = EvoSim(world)
viewer = EvoViewer(sim)