0

I'm running a fresh install of Ubuntu 18.04. I downgraded my NVIDIA driver to 390.129 (even though the instructions only mention that when installing Drake with CUDA support, which I'm not doing).

I've installed Docker and built Drake using the instructions here (not with NVIDIA support). docker build --file setup/ubuntu/docker/bionic/Dockerfile --tag drake . worked and docker run --interactive --tty drake bash starts without any issues.

When I try to launch Drake with the GUI using xhost +local:root; docker run --env=DISPLAY --env=QT_X11_NO_MITSHM=1 --interactive --ipc=host --privileged --tty --volume=/tmp/.X11-unix:/tmp/.X11-unix:rw drake; xhost -local:root;, I get this error:

non-network local connections being added to access control list
+ [[ 0 -eq 0 ]]
+ bazel build //tools:drake_visualizer //examples/acrobot:run_passive
Extracting Bazel installation...
Starting local Bazel server and connecting to it...
INFO: Analyzed 2 targets (100 packages loaded, 20684 targets configured).
INFO: Found 2 targets...
INFO: Elapsed time: 169.872s, Critical Path: 59.75s
INFO: 536 processes: 536 linux-sandbox.
INFO: Build completed successfully, 799 total actions
+ sleep 2
+ ./bazel-bin/tools/drake_visualizer
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast

Drake Scripts:
  Specified: --use_builtin_scripts=all
  Available: --use_builtin_scripts=frame,hydroelastic_contact,image,point_pair_contact,time

Hydroelastic Contact Visualizer subscriber added.
DrakeLcmImageViewer: Defer setup until 'DRAKE_RGBD_CAMERA_IMAGES' is received
Contact Visualizer subscriber added.
QOpenGLWindow::beginPaint: Failed to create context
QOpenGLWindow::beginPaint: Failed to make context current
ERROR: In /vtk/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx, line 741
vtkGenericOpenGLRenderWindow (0x55a0b9a5ac60): GLEW could not be initialized: Missing GL version

QOpenGLFunctions created with non-current context
./setup/ubuntu/docker/entrypoint.sh: line 15:  3175 Segmentation fault      (core dumped) ./bazel-bin/tools/drake_visualizer
+ bazel run //examples/acrobot:run_passive
INFO: Analyzed target //examples/acrobot:run_passive (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
Target //examples/acrobot:run_passive up-to-date:
  bazel-bin/examples/acrobot/run_passive
INFO: Elapsed time: 0.444s, Critical Path: 0.00s
INFO: 0 processes.
INFO: Build completed successfully, 1 total action
INFO: Build completed successfully, 1 total action
non-network local connections being removed from access control list

Any idea what the problem is? Do I have to install my NVIDIA drivers in the container as well? Thanks.

  • Do you need Bazel in the Docker container, or can you use CMake / Python? If it's the latter, you can use the published Docker images: https://drake.mit.edu/docker.html#using-published-images-on-docker-hub – Eric Cousineau Dec 14 '19 at 02:18

1 Answers1

0

I can confirm the same behavior on my system:

$ docker pull robotlocomotion/drake:latest
latest: Pulling from robotlocomotion/drake
Digest: sha256:17aa147cc215cb91326facae696720de15fdfe439a22a4ecf1bf79ca524a7d63
Status: Image is up to date for robotlocomotion/drake:latest
docker.io/robotlocomotion/drake:latest

$ (
xhost +local:root;
docker run \
  --env=DISPLAY \
  --env=QT_X11_NO_MITSHM=1 \
  --interactive \
  --privileged \
  --tty \
  --volume=/tmp/.X11-unix:/tmp/.X11-unix:rw \
  --rm \
  robotlocomotion/drake:latest \
  /opt/drake/bin/drake-visualizer
xhost -local:root
)

QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
QOpenGLWindow::beginPaint: Failed to create context
QOpenGLWindow::beginPaint: Failed to make context current
ERROR: In /vtk/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx, line 741
vtkGenericOpenGLRenderWindow (0x55b45ac8b730): GLEW could not be initialized: Missing GL version

QOpenGLFunctions created with non-current context

Will post a Drake issue and update this post with it. Thanks for reporting this!

EDIT: Drake issue: https://github.com/RobotLocomotion/drake/issues/12483

Eric Cousineau
  • 1,944
  • 14
  • 23