diff --git a/Plugin/unraid/Partnership/containers.sh b/Plugin/unraid/Partnership/containers.sh index 77ba5e5..8a32f9b 100755 --- a/Plugin/unraid/Partnership/containers.sh +++ b/Plugin/unraid/Partnership/containers.sh @@ -174,7 +174,12 @@ transform_xml_for_gpu() { local src_xml="$1" gpu_type="$2" # Detect GPU-aware XMLs — new style (--gpus "device=) or old style (--runtime=nvidia) - if ! grep -qE '--gpus[[:space:]]+"device=|--runtime=nvidia|NVIDIA_VISIBLE_DEVICES' "$src_xml" 2>/dev/null; then + # -- before the pattern is load-bearing: it begins with "--", so without it grep parses the + # pattern as an OPTION, exits 2, and the ! makes this branch always true — the function then + # returned the XML untransformed every single time, for every GPU type, with 2>/dev/null + # swallowing "invalid option". Every container onboarded to a mirror kept the owner NVIDIA + # device UUID and could not start on Intel or AMD hardware. Found 2026-08-23. + if ! grep -qE -- '--gpus[[:space:]]+"device=|--runtime=nvidia|NVIDIA_VISIBLE_DEVICES' "$src_xml" 2>/dev/null; then echo "$src_xml" return 0 fi