allenai / Holodeck

CVPR 2024: Language Guided Generation of 3D Embodied AI Environments.
https://yueyang1996.github.io/holodeck
Apache License 2.0
304 stars 25 forks source link

Running on a headless server #6

Closed 0010SS closed 7 months ago

0010SS commented 7 months ago

Thank you for your amazing work! I was trying to run the example code on my headless Ubuntu Server. I met the problem as below:

Traceback (most recent call last):
  File "/home/user/projects/anyhome/Holodeck/main.py", line 95, in <module>
    generate_single_scene(args)
  File "/home/user/projects/anyhome/Holodeck/main.py", line 21, in generate_single_scene
    args.model.generate_scene(
  File "/home/user/projects/anyhome/Holodeck/modules/holodeck.py", line 199, in generate_scene
    scene = self.generate_small_objects(scene, used_assets=used_assets)
  File "/home/user/projects/anyhome/Holodeck/modules/holodeck.py", line 141, in generate_small_objects
    controller = self.small_object_generator.start_controller(scene, self.objaverse_asset_dir)
  File "/home/user/projects/anyhome/Holodeck/modules/small_objects.py", line 225, in start_controller
    controller = Controller(
  File "/home/user/miniconda3/envs/holodeck/lib/python3.9/site-packages/ai2thor/controller.py", line 540, in __init__
    self._build = self.find_build(local_build, commit_id, branch, platform)
  File "/home/user/miniconda3/envs/holodeck/lib/python3.9/site-packages/ai2thor/controller.py", line 1464, in find_build
    raise Exception("\n".join(error_messages))
Exception: The following builds were found, but had missing dependencies. Only one valid platform is required to run AI2-THOR.
Platform Linux64 failed validation with the following errors: No valid X display found
  Linux64 requires a X11 server to be running with GLX. If you have a NVIDIA GPU, please run: sudo ai2thor-xorg start

It seems that the codebase uses ai2thor, which is built based on Unity (correct me if I'm wrong) and cannot be run on a headless server. I've also tried adding ai2thor_colab library into the codebase and initialize an X server using ai2thor_colab.start_xserver(). This also fails because it seems that the colab version relies on HTML:

<IPython.core.display.HTML object>
Traceback (most recent call last):
  File "/home/user/projects/anyhome/Holodeck/main.py", line 5, in <module>
    from modules.holodeck import Holodeck
  File "/home/user/projects/anyhome/Holodeck/modules/holodeck.py", line 16, in <module>
    from modules.small_objects import SmallObjectGenerator
  File "/home/user/projects/anyhome/Holodeck/modules/small_objects.py", line 11, in <module>
    ai2thor_colab.start_xserver()
  File "/home/user/miniconda3/envs/holodeck/lib/python3.9/site-packages/ai2thor_colab/__init__.py", line 289, in start_xserver
    progress_bar.update(progress(100))
AttributeError: 'NoneType' object has no attribute 'update'

Is there any way I can run the codebase on my headless server? Thanks!

sunfanyunn commented 7 months ago

Try adding the argument platform=CloudRendering here.

Reference: https://ai2thor.allenai.org/ithor/documentation/

djFatNerd commented 6 months ago
1704258219973

Hi, I followed the above instruction and set platform=CloudRendering, however, I am still getting this error, may I ask you what might be the possible cause for this? Thank you!

ZheningHuang commented 3 months ago

Same problem here, I wonder if this has a solution yet?

arjuntheprogrammer commented 3 weeks ago

I was able to solve this issue by adding platform=CloudRendering at multiple places wherever I found Controller being initialised.

image