Closed rssalessio closed 3 years ago
Thank you for the feedback @rssalessio. There is a dedicated parameter for the gym environment to handle this specific situation, we tested it and it works. The parameter is a boolean variable named headless
and is False
by default, you can set it to True
when running from remote (e.g. using ssh
). You can test the base example script directly: https://github.com/diambra/DIAMBRAenvironment/blob/main/examples/core/diambraGymGist.py
Please confirm it works for you too.
In addition to using headless=True
is now possible, thanks to commit 30773e183f7f80ed7500e3f54d9a582cee8fa626 specify the display you want to use when launching Xvfb
. Defaulted to 1
can be increased to find the first free slot.
Correct, one needs to use the option headless=True
when calling diambraGym
(alternatively, you should set diambra_gym_kwargs['headless']=True
when you call make_diambra_env
).
Moreover, there is no need to use X11 forwarding in ssh. Just make sure to have Xvfb installed on your ubuntu computer sudo apt-get install xvfb
.
This should be tested also on MacOS systems i guess.
I open this ticket because I don't think it is an easy bug to fix (or maybe not?)
I have tried to run DIAMBRA from remote using SSH, and it seems like it's not working. I get the error message "Could not initialize SDL No available video device". Perhaps this is an error due to the fact that the game is not able to open a window?
After few minutes another message pops up "terminate called without an active exception".
Most likely this has something to do with mame, I think.
What I have tried to do so far: