Not able to visualize the environment on AWS EC2
I am able to run the utils/visualize_env.py in the terminal and it is returning the score for 10 episodes. But it is not showing the actual visualization.
Any suggestions?
I am using xvfb-run bash to get the above said output. Otherwise, it returns libGLEW error.
I found a temporary fix to this problem using SSH tunneling by visualizing at a vnc port.
-
install
x11vnc:sudo apt-get install x11vnc xvfb -
Do the following:
export DISPLAY=:1
Xvfb $DISPLAY -screen 0 1024x768x16 &
x11vnc -display $DISPLAY -bg -forever -nopw -quiet -listen localhost -xkb
- Connect SSH tunneling using vncviewer:
ssh -L 5900:localhost:5900 user@remotehost
The details can be checked at https://stackoverflow.com/questions/12050021/how-to-make-xvfb-display-visible
I am able to visualize the environment on the vncviewer but it is not seamless. If anyone has any fix, please suggest.
Seems like installing dummy video drivers solves the issue. The above steps were not working even for off-screen rendering and port forwarding cannot work with the script so I did the following:
sudo apt install xserver-xorg-video-dummy
Now, it seems to work with off-screen rendering.
Please use offscreen rendering for remote operations.
utils/visualize_env.py -e <env_name> -r offscreen