Skip to content

Commit

Permalink
Add Zink nvidia support fedora40
Browse files Browse the repository at this point in the history
  • Loading branch information
thelamer committed May 22, 2024
1 parent 9babaf1 commit 88de28c
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ RUN \

FROM ghcr.io/linuxserver/baseimage-fedora:40 as buildstage

ARG KASMVNC_RELEASE="d49d07b88113d28eb183ca7c0ca59990fae1153c"
ARG KASMVNC_RELEASE="511e2ae542e95f5447a0a145bb54ced968e6cfec"

COPY --from=wwwstage /build-out /www

Expand Down Expand Up @@ -282,6 +282,7 @@ RUN \
mesa-libgbm \
mesa-libGL \
mesa-va-drivers \
mesa-vulkan-drivers \
nginx \
nodejs \
openbox \
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile.aarch64
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ RUN \

FROM ghcr.io/linuxserver/baseimage-fedora:arm64v8-40 as buildstage

ARG KASMVNC_RELEASE="d49d07b88113d28eb183ca7c0ca59990fae1153c"
ARG KASMVNC_RELEASE="511e2ae542e95f5447a0a145bb54ced968e6cfec"

COPY --from=wwwstage /build-out /www

Expand Down Expand Up @@ -285,6 +285,7 @@ RUN \
mesa-libgbm \
mesa-libGL \
mesa-va-drivers \
mesa-vulkan-drivers \
nginx \
nodejs \
openbox \
Expand Down
8 changes: 8 additions & 0 deletions root/defaults/startwm.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
#!/usr/bin/env bash

# Enable Nvidia GPU support if detected
if which nvidia-smi; then
export LIBGL_KOPPER_DRI2=1
export MESA_LOADER_DRIVER_OVERRIDE=zink
export GALLIUM_DRIVER=zink
fi

/usr/bin/openbox-session
2 changes: 1 addition & 1 deletion root/etc/s6-overlay/s6-rc.d/svc-kasmvnc/run
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/with-contenv bash

# Pass gpu flags if mounted
if ls /dev/dri/renderD* 1> /dev/null 2>&1 && [ -z ${DISABLE_DRI+x} ]; then
if ls /dev/dri/renderD* 1> /dev/null 2>&1 && [ -z ${DISABLE_DRI+x} ] && ! which nvidia-smi; then
HW3D="-hw3d"
fi
if [ -z ${DRINODE+x} ]; then
Expand Down

0 comments on commit 88de28c

Please sign in to comment.