Running over SSH
See original GitHub issueHi there, I am trying to run the environment over ssh on a linux server where I don’t have sudo rights, and I’m getting this error:
~/gym-miniworld/pytorch-a2c-ppo-acktr $ python main.py --algo ppo --num-frames 5000000 --num-processes 16 --num-steps 80 --lr 0.00005 --env-name MiniWorld-Hallway-v0
Traceback (most recent call last):
File "main.py", line 17, in <module>
from envs import make_vec_envs
File "/home/ml/mklissa/gym-miniworld/pytorch-a2c-ppo-acktr/envs.py", line 28, in <module>
import gym_miniworld
File "/home/ml/mklissa/gym-miniworld/gym_miniworld/__init__.py", line 1, in <module>
from . import miniworld
File "/home/ml/mklissa/gym-miniworld/gym_miniworld/miniworld.py", line 7, in <module>
from .opengl import *
File "/home/ml/mklissa/gym-miniworld/gym_miniworld/opengl.py", line 5, in <module>
from pyglet.gl import *
File "/home/ml/mklissa/miniconda2/envs/kag/lib/python3.6/site-packages/pyglet/gl/__init__.py", line 239, in <module>
import pyglet.window
File "/home/ml/mklissa/miniconda2/envs/kag/lib/python3.6/site-packages/pyglet/window/__init__.py", line 1896, in <module>
gl._create_shadow_window()
File "/home/ml/mklissa/miniconda2/envs/kag/lib/python3.6/site-packages/pyglet/gl/__init__.py", line 208, in _create_shadow_window
_shadow_window = Window(width=1, height=1, visible=False)
File "/home/ml/mklissa/miniconda2/envs/kag/lib/python3.6/site-packages/pyglet/window/xlib/__init__.py", line 166, in __init__
super(XlibWindow, self).__init__(*args, **kwargs)
File "/home/ml/mklissa/miniconda2/envs/kag/lib/python3.6/site-packages/pyglet/window/__init__.py", line 501, in __init__
display = get_platform().get_default_display()
File "/home/ml/mklissa/miniconda2/envs/kag/lib/python3.6/site-packages/pyglet/window/__init__.py", line 1845, in get_default_display
return pyglet.canvas.get_display()
File "/home/ml/mklissa/miniconda2/envs/kag/lib/python3.6/site-packages/pyglet/canvas/__init__.py", line 82, in get_display
return Display()
File "/home/ml/mklissa/miniconda2/envs/kag/lib/python3.6/site-packages/pyglet/canvas/xlib.py", line 86, in __init__
raise NoSuchDisplayException('Cannot connect to "%s"' % name)
pyglet.canvas.xlib.NoSuchDisplayException: Cannot connect to "None"
I’m not too sure how to resolve this
Thanks!
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
How To Run / Execute Command Using SSH - nixCraft
How do I run a command using ssh under UNIX, OS X, *BSD, and Linux operating systems? The SSH client program can be...
Read more >How to run SSH command and exit - Linux Hint
Prerequisites: · Run the different types of SSH Commands: · Run the single command: · Run multiple commands: · Run multiple commands with...
Read more >How to execute commands remotely using SSH in Linux?
Any Linux distribution. · Install OpenSSH and enable SSH service. · Generate SSH key pairs to execute remote commands from the local server...
Read more >How to execute a remote command over ssh with arguments?
I'm using the following to execute commands on the remote from my local computer: ssh -i ~/.ssh/$GIT_PRIVKEY user@$IP "bash -s" < localpath/script.sh $arg1 ......
Read more >How to Use SSH to Connect to a Remote Server in Linux or ...
Press Windows + R keys on your keyboard to get the “Run” box. Type in mstsc and hit Enter in the 'Open:' field...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
That probably means glx is not installed. Should be a simple fix. Best of luck!
Hi Martin,
In order to train over SSH, you need to create a virtual frame buffer to render into. This can be done using
xvfb-run
.Example command:
xvfb-run -a -s "-screen 0 1024x768x24 -ac +extension GLX +render -noreset" python3 main.py --algo ppo --num-processes 16 --num-steps 80 --lr 0.00005 --env-name MiniWorld-Hallway-v0
If this doesn’t work, or
xvfb-run
isn’t installed on the machines where you are training, you will need to communicate with the administrators and get them to install it. It’s a fairly standard tool.