Skip to content

Commit 33b4bfd

Browse files
fix(preflight): gate GPU runtime warning on detected backend
Fixes #748. The NVIDIA Docker runtime warning fired on AMD Strix Halo systems because the default backend fallback was "nvidia" when no GPU was detected via sysfs. Changed default to "cpu", added explicit elif/else branches so NVIDIA warnings only show for NVIDIA backends, and added /dev/dri positive check for AMD. CPU mode gets a clean pass. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 4703c4b commit 33b4bfd

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

dream-server/dream-preflight.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ detect_backend() {
4848
fi
4949
done
5050

51-
# 4. Default to nvidia (installer would have set .env anyway).
52-
echo "nvidia"
51+
# 4. No GPU detected — default to cpu.
52+
echo "cpu"
5353
}
5454

5555
BACKEND=$(detect_backend)
@@ -129,14 +129,17 @@ if [[ "$BACKEND" == "amd" ]]; then
129129
else
130130
warn "/dev/kfd not found — ROCm containers may fail"
131131
fi
132+
if [[ -d /dev/dri ]]; then
133+
pass "AMD GPU device nodes available (/dev/dri)"
134+
fi
132135
GPU_FOUND=true
133136
break
134137
fi
135138
done
136139
if [[ "$GPU_FOUND" == "false" ]]; then
137140
warn "No AMD GPU detected via sysfs"
138141
fi
139-
else
142+
elif [[ "$BACKEND" == "nvidia" ]]; then
140143
# NVIDIA: check nvidia-smi
141144
if command -v nvidia-smi &> /dev/null; then
142145
GPU_INFO=""
@@ -156,6 +159,8 @@ else
156159
else
157160
warn "nvidia-smi not found — NVIDIA GPU features unavailable"
158161
fi
162+
else
163+
pass "CPU mode — no GPU runtime required"
159164
fi
160165
log ""
161166

0 commit comments

Comments
 (0)