libGL error: failed to load driver swrast in docker container

Viewed 11713

I have a docker container from which I am trying to run a pyqt app. Everything works well except a chunk of the GUI is not able to render. The docker logs throw this out:

libGL error: failed to load driver: swrast
X Error: GLXBadContext 169
 Extension:    154 (Uknown extension)
 Minor opcode: 6 (Unknown request)
 Resource id:  0x6400003
X Error: BadValue (integer parameter out of range for operation) 2
 Extension:    154 (Uknown extension)
 Minor opcode: 3 (Unknown request)
 Resource id:  0x0
...
QGLContext::makeCurrent(): Failed.

In my Dockerfile, I tried installing pretty much all the packages I could find that might be related, including mesa-utils.

In terms of the docker-compose file, here's what it looks like:

version: '2'
    services:
    gui:
        build: .
        volumes:
        - .:/usr/src
        - /tmp/.X11-unix:/tmp/.X11-unix
        command: /bin/bash -c "python start.py"
        environment:
        - DISPLAY=unix$DISPLAY
        - QT_X11_NO_MITSHM=1
        devices:
        - "/dev/snd:/dev/snd"
        - "/dev/dri:/dev/dri"
        privileged: true

Any ideas what I might be missing?

1 Answers
Related