Update build.func
This commit is contained in:
parent
e3ac35fac2
commit
7373ecfc32
@ -2851,8 +2851,11 @@ build_container() {
|
|||||||
msg_custom "🎮" "${GN}" "Detected NVIDIA GPU"
|
msg_custom "🎮" "${GN}" "Detected NVIDIA GPU"
|
||||||
|
|
||||||
# Simple passthrough - just bind /dev/nvidia* devices if they exist
|
# Simple passthrough - just bind /dev/nvidia* devices if they exist
|
||||||
for d in /dev/nvidia* /dev/nvidiactl /dev/nvidia-modeset /dev/nvidia-uvm /dev/nvidia-uvm-tools; do
|
# Skip directories like /dev/nvidia-caps (they need special handling)
|
||||||
[[ -e "$d" ]] && NVIDIA_DEVICES+=("$d")
|
for d in /dev/nvidia*; do
|
||||||
|
[[ -e "$d" ]] || continue
|
||||||
|
[[ -d "$d" ]] && continue # Skip directories
|
||||||
|
NVIDIA_DEVICES+=("$d")
|
||||||
done
|
done
|
||||||
|
|
||||||
if [[ ${#NVIDIA_DEVICES[@]} -gt 0 ]]; then
|
if [[ ${#NVIDIA_DEVICES[@]} -gt 0 ]]; then
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user