Docker Community Forums

Share and learn in the Docker community.

Kivy not working with 9.0-devel-ubuntu16.04 as base image

docker

#1

We are trying to create a docker image with base image 9.0-devel-ubuntu16.04 and installing kivy with all dependencies. While running docker-compose up we are setting volume as
volumes:
- /tmp/.X11-unix:/tmp/.X11-unix

and environment DISPLAY variable is set
Host System
OS : Ubuntu18.04
NVIDIA-SMI 390.77 Driver version

We get the following error:

Traceback (most recent call last):
File “ex56.py”, line 45, in
Ex56App().run()
File “/usr/local/lib/python2.7/dist-packages/kivy/app.py”, line 829, in run
root = self.build()
File “ex56.py”, line 42, in build
return Ex56Widget()
File “/usr/local/lib/python2.7/dist-packages/kivy/uix/floatlayout.py”, line 65, in init
super(FloatLayout, self).init(**kwargs)
File “/usr/local/lib/python2.7/dist-packages/kivy/uix/layout.py”, line 76, in init
super(Layout, self).init(**kwargs)
File “/usr/local/lib/python2.7/dist-packages/kivy/uix/widget.py”, line 324, in init
EventLoop.ensure_window()
File “/usr/local/lib/python2.7/dist-packages/kivy/base.py”, line 122, in ensure_window
import kivy.core.window # NOQA
File “/usr/local/lib/python2.7/dist-packages/kivy/core/window/init.py”, line 2015, in
Window = core_select_lib(‘window’, window_impl, True)
File “/usr/local/lib/python2.7/dist-packages/kivy/core/init.py”, line 67, in core_select_lib
cls = cls()
File “/usr/local/lib/python2.7/dist-packages/kivy/core/window/init.py”, line 968, in init
self.create_window()
File “/usr/local/lib/python2.7/dist-packages/kivy/core/window/window_pygame.py”, line 148, in create_window
raise CoreCriticalException(e.message)
kivy.core.CoreCriticalException: Couldn’t find matching GLX visual

We have tried many options suggested on stackoverflow.
Appreciate help in this regard.