File tree Expand file tree Collapse file tree
root/etc/s6-overlay/s6-rc.d/init-video Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3535done
3636
3737# check if nvidia gpu is present
38- if which nvidia-smi >/dev/null 2>&1; then
38+ if which nvidia-smi > /dev/null 2>&1 && ls -A /dev/dri 2>/dev/null ; then
3939 # nvidia-container-toolkit may not place files correctly, so we set them up here
4040 echo "**** NVIDIA GPU detected ****"
41-
4241 OPENCL_ICDS=$(find /etc/OpenCL/vendors -name '*nvidia*.icd' 2>/dev/null)
4342 # if no opencl icd found
4443 if [ -z "${OPENCL_ICDS}" ]; then
4544 echo "**** Setting up OpenCL ICD for NVIDIA ****"
4645 mkdir -pm755 /etc/OpenCL/vendors/
4746 echo "libnvidia-opencl.so.1" > /etc/OpenCL/vendors/nvidia.icd
4847 fi
49-
5048 # find vulkan icds
5149 ICDS=$(find /usr/share/vulkan/icd.d /etc/vulkan/icd.d -name '*nvidia*.json' 2>/dev/null)
5250 # if no icd found
@@ -70,7 +68,6 @@ if which nvidia-smi >/dev/null 2>&1; then
7068}
7169EOF
7270 fi
73-
7471 # find glvnd egl_vendor files
7572 EGLS=$(find /usr/share/glvnd/egl_vendor.d /etc/glvnd/egl_vendor.d -name '*nvidia*.json' 2>/dev/null)
7673 # if no egl_vendor file found
You can’t perform that action at this time.
0 commit comments