Open3D icon indicating copy to clipboard operation
Open3D copied to clipboard

open3D error show in docker

Open fellen88 opened this issue 5 years ago • 4 comments

I want to show pointcloud in docker, however ,there are errors report as below:

[Open3D WARNING] GLFW Error: X11: Failed to open display unix:1 [Open3D WARNING] Failed to initialize GLFW

fellen88 avatar Oct 18 '21 03:10 fellen88

make sure xhost is executed in host:

sudo xhost +

and check host $DISPLAY env. If $DISPLAY is unix:1 or :1, the $DISPLAY in docker should be set to unix:1

forrestjgq avatar Oct 26 '21 02:10 forrestjgq

make sure xhost is executed in host:

sudo xhost +

and check host $DISPLAY env. If $DISPLAY is unix:1 or :1, the $DISPLAY in docker should be set to unix:1

My host $DISPLAY env is unix:1 and I run xhost + ,then I got another error below: libGL error: No matching fbConfigs or visuals found libGL error: failed to load driver: swrast [Open3D WARNING] GLFW Error: GLX: Failed to create context: BadMatch (invalid parameter attributes) [Open3D WARNING] Failed to create window

fellen88 avatar Nov 01 '21 08:11 fellen88

Hi @fellenB your docker container needs access to the GPU for visualization to work. This is GPU specific:

  • For Intel and AMD GPUs: http://wiki.ros.org/docker/Tutorials/Hardware%20Acceleration
  • For NVIDIA GPUs: https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html

ssheorey avatar Jan 12 '22 22:01 ssheorey

I've some issue similar with that, and fixed by checking opengl library version with nvidia driver version. For example, the nvidia-smi shows:

Fri Jan 14 18:15:14 2022       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 470.86       Driver Version: 470.86       CUDA Version: 11.4     |
|-------------------------------+----------------------+----------------------+

here the driver version is 470.86, so you need to install libnvidia-gl-470 with same minor version. This is apt searching result:

$ apt search libnvidia-gl-470
libnvidia-gl-465/focal-updates,focal-security 470.86-0ubuntu0.20.04.2 amd64
  Transitional package for libnvidia-gl-470

libnvidia-gl-470/focal-updates,focal-security,now 470.86-0ubuntu0.20.04.2 amd64 [已安装,自动]
  NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD

Note now 470.86-0ubuntu0.20.04.2 amd64 here must be 470.86

forrestjgq avatar Jan 14 '22 10:01 forrestjgq