Open3D icon indicating copy to clipboard operation
Open3D copied to clipboard

run in docker terminal

Open takanokage opened this issue 8 years ago • 7 comments

This would be the ultimate headless test: run Open3D from a terminal attached to the running container. Open3D should find the virtual display and use it.

takanokage avatar Mar 28 '18 15:03 takanokage

Currently running Tutorial/Basic/rgbd_redwood.py from the Docker terminal leads to a segmentation fault. The error message suggests that if GLFW would be able to find the virtual display maybe this could work.

GLFW Error: X11: The DISPLAY environment variable is missing
Failed to initialize GLFW
GLFW Error: The GLFW library is not initialized
Fatal Python error: Segmentation fault

Thread 0x00007f04fbdbd700 (most recent call first):
  File "./test.py", line 22 in custom_draw_geometry
  File "./test.py", line 29 in <module>
Segmentation fault (core dumped)

takanokage avatar Mar 28 '18 15:03 takanokage

In order to run headless an Open3D python script in docker terminal:

  1. Run the Open3D container then attach to it.
  2. $ Xvfb :99 -screen 0 1920x1080x24
  3. $ DISPLAY=:99.0
  4. $ export DISPLAY
  5. $ ./test.py &

I tested it with the docker image I built for Open3D. This works great with the master branch and it doesn't need glfw 3.3. I'm taking this note here before putting it in the doc just so that I don't forget about it.

takanokage avatar Mar 29 '18 04:03 takanokage

This is good news. Thanks @takanokage. What test.py does? Can it render and save frame buffers like Advanced/customized_visualization.py from terminal?

Related to #17.

syncle avatar Mar 29 '18 06:03 syncle

test.py is just the first part of Advanced/customized_visualization.py: 1. Customized visualization to mimic DrawGeometry

takanokage avatar Mar 29 '18 15:03 takanokage

Alright. Can you check Advanced/customized_visualization.py with docker solution you are working with? One of the major goal for headless rendering is to save images (color, depth, normal) remotely.

syncle avatar Mar 29 '18 15:03 syncle

Yep, just tested and it works to save the images.

takanokage avatar Mar 29 '18 16:03 takanokage

Closing this as I have a solution which will be included in the pull request for #17.

takanokage avatar Mar 29 '18 17:03 takanokage