File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -2442,9 +2442,16 @@ build_container() {
24422442 msg_custom " 🎮" " ${GN} " " Detected NVIDIA GPU"
24432443
24442444 # Simple passthrough - just bind /dev/nvidia* devices if they exist
2445- for d in /dev/nvidia* /dev/nvidiactl /dev/nvidia-modeset /dev/nvidia-uvm /dev/nvidia-uvm-tools; do
2446- [[ -e " $d " ]] && NVIDIA_DEVICES+=(" $d " )
2445+ # Only include character devices (-c), skip directories like /dev/nvidia-caps
2446+ for d in /dev/nvidia* ; do
2447+ [[ -c " $d " ]] && NVIDIA_DEVICES+=(" $d " )
24472448 done
2449+ # Also check for devices inside /dev/nvidia-caps/ directory
2450+ if [[ -d /dev/nvidia-caps ]]; then
2451+ for d in /dev/nvidia-caps/* ; do
2452+ [[ -c " $d " ]] && NVIDIA_DEVICES+=(" $d " )
2453+ done
2454+ fi
24482455
24492456 if [[ ${# NVIDIA_DEVICES[@]} -gt 0 ]]; then
24502457 msg_custom " 🎮" " ${GN} " " Found ${# NVIDIA_DEVICES[@]} NVIDIA device(s) for passthrough"
You can’t perform that action at this time.
0 commit comments