It's samples of running GUI apllications in Docker container.
I understood from this samples that:
- There is a slight delay in keyboard input.
- The flag
--gpus all
is required on Linux. - OpenGL programs executed via WSLg and Docker Desktop cannot synchronize with vertical sync.
- Vulkan is unavailable in Docker containers.
- Distributing GUI applications as Docker containers may be useful for learning purposes related to libraries, but may not be practical for real-world applications.
- Install Docker.
- Install NVIDIA Driver.
- Install NVIDIA Container Toolkit.
- Run
export DOCKER_USER=$(id -u):$(id -g)
. - Run
docker compose -f docker-compose-linux.yml up
or./run.sh
at each directory.
If you use WSLg:
- Install WSL2 and make sure WSLg is enabled. Do all the following tasks on WSL2.
- Install Docker.
- Install NVIDIA Container Toolkit.
- Run
docker compose -f docker-compose-wsl.yml up
at each directory.
If you use VcXsrv:
- Install WSL2.
- Install VcXsrv and run it.
- Install Docker Desktop and run it.
- Run
docker compose -f docker-compose-desktop.yml up
at each directory.