bug: onboard passes --gpu to gateway/sandbox on DGX Spark, causing FailedPrecondition
Problem
nemoclaw onboard detects the host NVIDIA GPU via nim.detectGpu() and passes --gpu to both openshell gateway start and openshell sandbox create. On DGX Spark, this causes:
Error: × status: FailedPrecondition, message: "GPU sandbox requested, but the active gateway has no allocatable GPUs."
The sandbox still gets created (the error is non-fatal), but downstream failures cascade — port forwarding conflicts with stale sandboxes, and openshell policy set --wait fails with "sandbox not found" because the sandbox is in a degraded state.
Root Cause
The official NVIDIA DGX Spark playbooks (NemoClaw, OpenShell) do not use --gpu on gateway or sandbox creation. On Spark, GPU access is provided through Ollama running on the host, routed to the sandbox via openshell provider create / openshell inference set. The sandbox itself does not need direct GPU passthrough.
The NemoClaw Spark troubleshooting table explicitly states:
"No GPU detected" → "Expected on DGX Spark; proceeds normally"
Our onboard.js (line 116, 187) unconditionally passes --gpu whenever gpu.nimCapable is truthy, which is true on any host with an NVIDIA GPU — including DGX Spark where GPU passthrough to openshell sandboxes is not configured or expected.
Affected Code
bin/lib/onboard.jsline 116:if (gpu && gpu.nimCapable) gwArgs.push("--gpu");bin/lib/onboard.jsline 187:if (gpu && gpu.nimCapable) createArgs.push("--gpu");
Additional Finding
The official Spark playbook includes a Docker configuration step that our setup-spark.sh does not perform:
sudo nvidia-ctk runtime configure --runtime=docker
This registers the NVIDIA container runtime in daemon.json. Our setup-spark.sh only sets default-cgroupns-mode: host but never configures the NVIDIA runtime. This may be a separate issue but is worth noting.
Proposed Fix
--gpu should only be passed when:
- A host NVIDIA GPU is detected, AND
- The user explicitly selects local NIM inference (not cloud API or Ollama), AND
- GPU passthrough is verified to work (e.g.,
openshell doctoror a testdocker run --gpus all)
On DGX Spark specifically, the onboard flow should follow the official playbook: gateway without --gpu, sandbox without --gpu, inference routed through a host-side Ollama provider.
Acceptance Criteria
- [ ]
nemoclaw onboardcompletes without GPU-related errors on DGX Spark - [ ]
--gpuis not passed to gateway/sandbox when inference is routed through Ollama or cloud API - [ ] Policy presets apply successfully after sandbox creation
- [ ] E2E validation on DGX Spark: full install → onboard → sandbox creation → inference routing → live inference response through the sandbox, matching the official playbook flow
- [ ] No regression on non-Spark Linux hosts where
--gpuis intentionally used
References
- Official NemoClaw Spark playbook: https://build.nvidia.com/spark/nemoclaw/instructions
- Official OpenShell Spark playbook: https://build.nvidia.com/spark/openshell
- NVIDIA Container Runtime docs: https://docs.nvidia.com/dgx/dgx-spark/nvidia-container-runtime-for-docker.html
- Internal Spark install guide:
spark-install.md(line 106: "GPU passthrough | Untested on Spark")
Closed by #238