Skip to content

OpenGL acceleration with Docker #395

Discussion options

You must be logged in to vote

The team just posted a sample of a container with accelerated OpenGL.

https://github.com/microsoft/wslg/tree/main/samples/container

After looking at that this worked for me:

docker run -it --rm -v /tmp/.X11-unix:/tmp/.X11-unix -v /mnt/wslg:/mnt/wslg -v /usr/lib/wsl:/usr/lib/wsl --device=/dev/dxg -e DISPLAY=$DISPLAY -e WAYLAND_DISPLAY=$WAYLAND_DISPLAY -e XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR -e PULSE_SERVER=$PULSE_SERVER -e LD_LIBRARY_PATH=/usr/lib/wsl/lib --gpus all ubuntu/latest:opengl2

I guess the most important part was using the env variable LD_LIBRARY_PATH=/usr/lib/wsl/lib

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@conroy-cheers
Comment options

@onomatopellan
Comment options

@dwbertol
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by spronovo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants