Skip to content

Commit

Permalink
fix: better checks in for nvidia driver configs
Browse files Browse the repository at this point in the history
fixes #179
  • Loading branch information
ABeltramo committed Jul 16, 2024
1 parent 7e378b2 commit 19485e1
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions images/base/overlay/etc/cont-init.d/30-nvidia.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,13 @@ if [ -d /usr/nvidia ]; then
mkdir -p /usr/lib/x86_64-linux-gnu/gbm/
cp /usr/nvidia/lib/gbm/* /usr/lib/x86_64-linux-gnu/gbm/
fi
fi

# Check if there's libnvidia-allocator.so.1
if [ -L /usr/lib/x86_64-linux-gnu/libnvidia-allocator.so.1 ]; then
elif [ -e /usr/lib/x86_64-linux-gnu/libnvidia-allocator.so.1 ]; then
gow_log "Nvidia driver detected, assuming it's using the nvidia driver volume"
ldconfig

# Create a symlink to the nvidia-drm_gbm.so (if not present)
if [ ! -L /usr/lib/x86_64-linux-gnu/gbm/nvidia-drm_gbm.so ]; then
if [ ! -e /usr/lib/x86_64-linux-gnu/gbm/nvidia-drm_gbm.so ]; then
gow_log "Creating symlink to nvidia-drm_gbm.so"
mkdir -p /usr/lib/x86_64-linux-gnu/gbm
ln -sv ../libnvidia-allocator.so.1 /usr/lib/x86_64-linux-gnu/gbm/nvidia-drm_gbm.so
Expand Down

0 comments on commit 19485e1

Please sign in to comment.