ai2thor icon indicating copy to clipboard operation
ai2thor copied to clipboard

Run ai2thor on ubuntu server

Open Xie-Nav opened this issue 2 years ago • 1 comments

I have installed ai2thor on the ubuntu server,But when I run AI2THOR, there will be an error like this:ValueError: Invalid commit_id: b762f5c3ff289cc3eb8aa2461dd036b4e633de67 - no build exists for arch=Linux platforms=Linux64, I checked the information and found out that it was because X server was not installed. Does anyone know how to install X server in ubuntu server? Hope someone can share with me,thank you very much

Xie-Nav avatar Jan 07 '22 06:01 Xie-Nav

I had this problem. For me came from proxy and network setting. But if you want to run ai2thor on Ubuntu server you can follow these steps which works for me on Ubuntu 20.04 LTS :

  1. install ubuntu-desktop (comes with X11 and more) and set gui.
sudo apt update
sudo apt install tasksel
sudo tasksel install ubuntu-desktop
sudo systemctl set-default graphical.target

now reboot the server.

  1. (optional) then create a virtual env and install ai2thor:
sudo apt install python3-pip
sudo apt install python3.8-venv
python3 -m venv ai2thor

echo "source $HOME/ai2thor/bin/activate" >> $HOME/.bashrc

pip install ai2thor
  1. (IMPORTANT) create a virtual in-memory display using xvfb:
sudo apt install xvfb

export DISPLAY=:99.0
Xvfb :99 -screen 0 640x480x24 &

Note: Now you can add export DISPLAY=:99.0 to .bashrc to set $DISPLAY environment variable for further use.

echo "export DISPLAY=:99.0" >> $HOME/.bashrc

References: https://linuxconfig.org/ubuntu-20-04-gui-installation https://moderngl.readthedocs.io/en/5.6.2/the_guide/headless_ubunut18_server.html

ffletcherr avatar Feb 21 '22 00:02 ffletcherr