Closed li3cmz closed 4 years ago
Hi, do you have any ideas about how to do this on headless server?
Is there a workaround for this? I'm also looking for a way to run headless. I still need to process the image, just not render it on a screen since my servers don't have xorg or docker. I tried:
headless=true
for the controller, but no image is created in this case. Same with -nographics
for unity.glxgears
and glxinfo
runs fine with the virtual display.
Desktop is 800 x 600 @ 0 Hz
Unable to find a supported OpenGL core profile
Failed to create valid graphics context: please ensure you meet the minimum requirements
E.g. OpenGL core profile 3.2 or later for OpenGL Core renderer
Vulkan detection: 0
No supported renderers found, exiting
(Filename: Line: 634)
Related issues: https://github.com/allenai/ai2thor/issues/41, https://github.com/allenai/ai2thor/issues/21
Looks like there's some sort of incompatibility with Ubuntu 18.04 and Xvfb-1.19.6. Following the instructions at this issue from the ml-agents repo fixes the issue for me. The following runs now:
xvfb-run --auto-servernum --server-args='-screen 0 640x480x24' python run.py
@li3cmz Hi, did you solve this problem? Even I did not get an error on controller.start()
, I notice controller.last_event.frame
is empty. Should this be expected when docker_enable=True
?
@Tushar-N what fps do you get by using xvfb?
Around 20FPS with multiple instances running (8 envs in parallel). If I render on GPU, I can get ~40FPS.
@Tushar-N Do you get ~40 FPS on a GPU with a single thread or with 8 envs in parallel?
Really appreciate your prompt responses. Thank you!
Please take a look at this: https://github.com/allenai/ai2thor-docker
It is a mini-framework to make running ai2thor in docker easier.
Closing as this appears to be solved with AI2-THOR Docker. Feel free to re-open if there are any related follow-ups :)
I run ai2thor (with unity command in graphics mode and nographics mode ) on headless linux server using the docker provided. The problem I meet is as follow:
First, if I don't change any code and run the code on docker below: test.py
Then, I will get a error in docker container build from ai2thor/ai2thor-nvidia-version:tag:
The complete log is as follow:
Second, I change the code below:
In file "anaconda2/lib/python2.7/site-packages/ai2thor-0.0.44-py2.7.egg/ai2thor/controller.py" line 598 fuction: def unity_command(self, width, height)
Then rerun the test.py, and no doubtly,the application can run successfully. But all the value of RGB I get from event.frame is 205. That it to say, unable to get the program output graphics information.
Are there any way to get the unity GUI output normally when run program in headless linux server's docker without adding "-batchmode -nographics" to the unity start command.
Really desire for a response. Many thanks!!