Mount DRI In Native Mode

This commit is contained in:
TheBrokenRail 2020-10-16 15:45:00 -04:00
parent bdb027e1f2
commit d602764f38
5 changed files with 17 additions and 8 deletions

View File

@ -2,4 +2,4 @@
set -e set -e
MCPI_MODE='' MCPI_FEATURES='' MCPI_USERNAME='' docker-compose -f /usr/share/minecraft-pi/client/docker-compose.yml pull MCPI_FEATURES='' MCPI_USERNAME='' docker-compose -f /usr/share/minecraft-pi/client/docker-compose.yml pull

View File

@ -2,8 +2,5 @@
set -e set -e
# Enable VirGL
export MCPI_MODE=native
# Launch Minecraft # Launch Minecraft
${DOCKER_COMPOSE} run --rm minecraft-pi ${DOCKER_COMPOSE} run --rm minecraft-pi

View File

@ -0,0 +1,15 @@
version: '3.7'
services:
minecraft-pi:
image: 'thebrokenrail/minecraft-pi:client'
network_mode: 'host'
volumes:
- '/tmp/.X11-unix:/tmp/.X11-unix'
- '~/.minecraft-pi:/root/.minecraft'
devices:
- '/dev/dri:/dev/dri'
environment:
- 'DISPLAY=unix${DISPLAY}'
- 'MCPI_FEATURES=${MCPI_FEATURES}'
- 'MCPI_USERNAME=${MCPI_USERNAME}'
- 'MCPI_MODE=native'

View File

@ -2,9 +2,6 @@
set -e set -e
# Enable VirGL
export MCPI_MODE=virgl
# Start VirGL # Start VirGL
virgl_test_server & virgl_test_server &
VIRGL_PID="$!" VIRGL_PID="$!"

View File

@ -11,4 +11,4 @@ services:
- 'DISPLAY=unix${DISPLAY}' - 'DISPLAY=unix${DISPLAY}'
- 'MCPI_FEATURES=${MCPI_FEATURES}' - 'MCPI_FEATURES=${MCPI_FEATURES}'
- 'MCPI_USERNAME=${MCPI_USERNAME}' - 'MCPI_USERNAME=${MCPI_USERNAME}'
- 'MCPI_MODE=${MCPI_MODE}' - 'MCPI_MODE=virgl'