ai2thor
ai2thor copied to clipboard
Cannot establish controller in a remote linux server
Hi, I met a problem when I was trying to run ai2thor on my remote linux server.
import ai2thor.controller
controller = ai2thor.controller.Controller()
After running the codes, a black window would show up and exit quickly, and the server fedback with error as follows:
Found path: /home/server84/.ai2thor/releases/thor-Linux64-8db5080010a07f037367ad6be0fd83d8f5f75240/thor-Linux64-8db5080010a07f037367ad6be0fd83d8f5f75240
Traceback (most recent call last):
File "/home/server84/miniconda3/lib/python3.7/site-packages/ai2thor/wsgi_server.py", line 39, in queue_get
res = que.get(block=True, timeout=0.5)
File "/home/server84/miniconda3/lib/python3.7/queue.py", line 178, in get
raise Empty
_queue.Empty
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/server84/miniconda3/lib/python3.7/site-packages/ai2thor/controller.py", line 426, in __init__
host=host
File "/home/server84/miniconda3/lib/python3.7/site-packages/ai2thor/controller.py", line 929, in start
self.last_event = self.server.receive()
File "/home/server84/miniconda3/lib/python3.7/site-packages/ai2thor/wsgi_server.py", line 212, in receive
return queue_get(self.request_queue, self.unity_proc)
File "/home/server84/miniconda3/lib/python3.7/site-packages/ai2thor/wsgi_server.py", line 45, in queue_get
raise Exception("Unity process exited %s" % unity_proc.returncode)
Exception: Unity process exited 1
Meanwhile, when I tried the same code locally on the server, no problems showed up.
Same problem, did you fix it?
Can you take a look for an error in either $HOME/.config/unity3d/Allen Institute for Artificial Intelligence/AI2-THOR
or in $HOME/.ai2thor/log/unity.log
?
ai2thor depends on Unity which requires an Xorg server to be running with an OpenGL driver enabled. The following guide https://github.com/Unity-Technologies/ml-agents/blob/main/docs/Training-on-Amazon-Web-Service.md provides a good description of what is required to setup an environment. Make sure to follow the steps for setting up a Xorg server. Once you have everything configured you can run the program glxgears
(provided by the package mesa-utils on Ubuntu) to test whether OpenGL is running on your DISPLAY. For most recent Nvidia cards you should see fps rates in the thousands per second.