minerl
minerl copied to clipboard
Support for headless rendering without virtual display
Running on a server via xvfb-run
can cause a range of difficult to debug problems and is incompatible with the OpenGL library that comes with the Nvidia GPU driver. There are several other people running into these problems (#21, #26, #34, #207, #223). I've heard you're thinking about supporting headless rendering directly in the environment. Is this true and what is the current status of this idea?
In order to run minerl environments WITHOUT A HEAD use a software renderer such as 'xvfb':
xvfb-run python3 <your_script.py>
! NOTE: xvfb conflicts with NVIDIA-drivers!
! To run headless MineRL on a system with NVIDIA-drivers, please start a
! vnc server of your choosing and then `export DISPLAY=:<insert ur vnc server #>
If you're receiving this error and there is a monitor attached, make sure your current displayvariable is set correctly:
DISPLAY=:0 python3 <your_script.py>
! NOTE: For this to work your account must be logged on the physical monitor.
If none of these steps work, please complain in the discord!
If all else fails, JUST PUT THIS IN A DOCKER CONTAINER! :)
Thanks! It would be worth providing instructions for how to do this. I have never used a VNC server and I can imagine this is true for many users of MineRL.
we do not need to show frames when training. it is slow for training while showing frames. so how to turn off it?
is there any tutorial for how to train in headless server?
Hey all! Just wanted to chime in here.
Yes. We are planning on supporting headless rendering using EGL. This will require us basically taking over Malmo and upgrading its version of Minecraft to 1.14. We would then be able to support rendering without a head, super fast rendering of only game block state, etc. This is a major overhaul and will happen in some months.
In the mean time, I am planning on rehauling the documentation to make the process of running MineRL (malmo) on a headless server more reasonable. This plagues a series of other RL environments such as Unity and ROS and currently, the best solution seems to be to get VNCServer or Virtual Heads to work. Providing documentaiton that allows people to consistently set up VNC servers is f*ing difficult IMO, and I would love any help anyone is willing to provide in this regard!
I will keep eveyrone posted in discord as we push for this feature.
Thank you so much for your patience!
Thanks for the update --- I'm very much looking forward to offline rendering. Do you have some preliminary instructions for the VNC server that I could start from? I imagine if a couple of people try it, we'll together end up with a list of instructions that generalize to other's servers.
hahaha...Finally, I found a server with a head...
@MadcowD Happy new year! I'm really excited about using MineRL for research once it supports headless rendering. Setting up a virtual server isn't feasible on the cluster we're using unfortunately. Are you still planning on upgrading to Minecraft 1.14 and supporting headless rendering through EGL?
Any update with this?
@MadcowD are there plans to enable headless rendering in time for this year's MineRL competition?
Any updates on this @Miffyli? Support for headless rendering Also curious if you were able to find a workaround @danijar?
I assume this was question was handled for Discord :). The answer was "no updates".
An alternative to xvfb, that might work for some, is detailed here which is reported to result in similar performance as headed runs.
Hi all,
Sorry for bringing this up here, but we made it to run MineRL with GPU rendering on a headless, rootless GPU server without host-side X configuration. Please check out this docker (kudos to the original repo). It has been tested with RTX 3090, V100, and A100 GPUs. You may also find this discussion relatable.
@jeasinema Hey! Thanks a ton for sharing this! Would you feel like making a PR that adds this to docs? I can do this as well, but would like to know who I should credit for this beauty (assuming it is you, but I want to double-check) :)
@Miffyli PR has been made here.