Skip to content

Multi-Arch Docker - Mesa 3D OpenGL Software Rendering (Gallium) - LLVMpipe, and OpenSWR Drivers

License

Notifications You must be signed in to change notification settings

BoundfoxStudios/docker-opengl

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Multi-Arch Docker - Mesa 3D OpenGL Software Rendering (Gallium) - LLVMpipe, and OpenSWR Drivers

About

Minimal Docker container bundled with the Mesa 3D Gallium Drivers: LLVMpipe & OpenSWR, enabling OpenGL support inside a Docker container without the need for a GPU.

Features

  • Alpine Linux Edge
  • Mesa Versions: latest stable 22.3.7
  • LLVMpipe Driver
  • OpenSWR Driver
  • OSMesa Interface
  • softpipe - Reference Gallium software driver
  • swrast - Legacy Mesa software rasterizer
  • Xvfb - X Virtual Frame Buffer

Docker Images

Please note there are images available for Alpine versions 3.10, 3.11 as well. Please see all available tags on DockerHub

Image Description Architectures Base Image
boundfoxstudios/opengl:latest Latest Mesa version amd64, 386, arm64, arm/v7 alpine:edge
boundfoxstudios/opengl:stable Stable Mesa version amd64, 386, arm64, arm/v7 alpine:edge
boundfoxstudios/opengl:22.3.7 Mesa version 22.3.7 amd64, 386, arm64, arm/v7 alpine:edge

Building

This image can be built locally using the supplied Makefile

Make default image (stable):

make

Make latest image:

make latest

Make all images:

make all

Usage

This image is intended to be used as a base image to extend from. One good example of this is the Gource project which allows for quick and easy Gource visualizations from within a Docker container.

Extending from this image.

FROM boundfoxstudios/opengl:latest
COPY ./MyAppOpenGLApp /AnywhereMyHeartDesires
RUN apk add --update my-deps...

Environment Variables

The following environment variables are present to modify rendering options.

High level settings

Variable Default Value Description
XVFB_WHD 1920x1080x24 Xvfb demensions and bit depth.
DISPLAY :99 X Display number.
LIBGL_ALWAYS_SOFTWARE 1 Forces Mesa 3D to always use software rendering.
GALLIUM_DRIVER llvmpipe Sets OpenGL Driver llvmpipe, swr, softpipe, and swrast

Lower level settings / tweaks

Variable Default Value Description
LP_NO_RAST false LLVMpipe - If set LLVMpipe will no-op rasterization
LP_DEBUG "" LLVMpipe - A comma-separated list of debug options is accepted
LP_PERF "" LLVMpipe - A comma-separated list of options to selectively no-op various parts of the driver.
LP_NUM_THREADS "" LLVMpipe - An integer indicating how many threads to use for rendering. Zero (0) turns off threading completely. The default value is the number of CPU cores present.

About

Multi-Arch Docker - Mesa 3D OpenGL Software Rendering (Gallium) - LLVMpipe, and OpenSWR Drivers

Resources

License

Stars

Watchers

Forks

Languages

  • Dockerfile 61.7%
  • Makefile 29.4%
  • Shell 8.9%