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

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
- /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 “”, line 45, in
File “/usr/local/lib/python2.7/dist-packages/kivy/”, line 829, in run
root =
File “”, line 42, in build
return Ex56Widget()
File “/usr/local/lib/python2.7/dist-packages/kivy/uix/”, line 65, in init
super(FloatLayout, self).init(**kwargs)
File “/usr/local/lib/python2.7/dist-packages/kivy/uix/”, line 76, in init
super(Layout, self).init(**kwargs)
File “/usr/local/lib/python2.7/dist-packages/kivy/uix/”, line 324, in init
File “/usr/local/lib/python2.7/dist-packages/kivy/”, line 122, in ensure_window
import kivy.core.window # NOQA
File “/usr/local/lib/python2.7/dist-packages/kivy/core/window/”, line 2015, in
Window = core_select_lib(‘window’, window_impl, True)
File “/usr/local/lib/python2.7/dist-packages/kivy/core/”, line 67, in core_select_lib
cls = cls()
File “/usr/local/lib/python2.7/dist-packages/kivy/core/window/”, line 968, in init
File “/usr/local/lib/python2.7/dist-packages/kivy/core/window/”, 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.