robohive icon indicating copy to clipboard operation
robohive copied to clipboard

Not able to visualize the environment on AWS EC2

Open anilsh opened this issue 4 years ago • 2 comments

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.

anilsh avatar Oct 06 '21 10:10 anilsh

I found a temporary fix to this problem using SSH tunneling by visualizing at a vnc port.

  1. install x11vnc: sudo apt-get install x11vnc xvfb

  2. Do the following:

export DISPLAY=:1
Xvfb $DISPLAY -screen 0 1024x768x16 &
x11vnc -display $DISPLAY -bg -forever -nopw -quiet -listen localhost -xkb
  1. 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.

anilsh avatar Oct 07 '21 05:10 anilsh

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.

anilsh avatar Oct 27 '21 03:10 anilsh

Please use offscreen rendering for remote operations. utils/visualize_env.py -e <env_name> -r offscreen

vikashplus avatar Apr 15 '23 21:04 vikashplus