Short version
How can I get an integrated-graphics-accelerated headless X display running inside a Google Cloud Kubernetes Engine pod?
Background
I'm working on a reinforcement learning project that involves running a large number of simulated environments in parallel. I'm doing the simulations using Google Cloud Kubernetes Engine, with panda3d rendering to an Xvfb virtual display.
However, I've noticed that the simulation on my Macbook runs 2x faster than the one on Kubernetes, and profiling suggests the difference is entirely from drawing the frame. Other operations - like linear algebra - are at most 30% slower. My theory is this is because on my Macbook panda3d can take advantage of the integrated graphics, while Xvfb uses software rendering.
My suspicion - gathering together the info in the links below - is the trick is to get a hardware-accelerated headless X server running, then use Virtual GL to fork it across a second Xvfb display. But lord, I am way out of my depth here.
Uncertainties
- Is hardware vs software rendering actually the source of my slowdown?
- Do Google Cloud instances have integrated graphics?
- Can a Kubernetes pod use integrated graphics without modifications to the host?