Skip to content

usb-configuration-base: disable CUDA in onnxruntime - #151

Merged
graham33 merged 1 commit into
mainfrom
usb-image-onnxruntime-no-cuda
Jul 30, 2026
Merged

usb-configuration-base: disable CUDA in onnxruntime#151
graham33 merged 1 commit into
mainfrom
usb-image-onnxruntime-no-cuda

Conversation

@graham33-agent

Copy link
Copy Markdown
Contributor

Summary

The usb-image build fails because the dgx-spark module sets nixpkgs.config.cudaSupport = true globally, so Firefox's onnxruntime dependency (via its optional ML features) is built with CUDA. That pulls in cudnn-frontend, which fails on the current nixpkgs pin: FindCUDAToolkit receives a mangled CUDAToolkit_ROOT and cannot find nvcc (aarch64 / CMake 4.3 bug).

This adds an overlay to the USB image configuration disabling CUDA in onnxruntime, mirroring the spark host's existing local overlay for the same bug.

Firefox is the only direct referrer of onnxruntime in the ISO's full derivation closure (verified across all 7,501 paths), so nothing else in the image is affected.

Testing

  • nix build .#usb-image --dry-run --builders "" confirms cudnn-frontend is no longer in the build plan and onnxruntime resolves to a non-CUDA derivation.
  • Pre-commit hooks pass on all files.

Note: opencv (via firefox → onnxruntime → openvino) still builds locally with CUDA 12.9 — it builds successfully, just slowly, and is not addressed here.

🤖 Generated with Claude Code

The dgx-spark module sets nixpkgs.config.cudaSupport = true globally, so
the USB image builds Firefox's onnxruntime dependency (via its optional
ML features) with CUDA. That pulls in cudnn-frontend, which fails to
build on this nixpkgs pin: FindCUDAToolkit gets a mangled
CUDAToolkit_ROOT and cannot find nvcc (aarch64 / CMake 4.3 bug).

Firefox is the only consumer of onnxruntime in the image closure, so
disable CUDA there to sidestep the broken toolchain path. This mirrors
the spark host's existing local overlay for the same bug.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@neobrain

Copy link
Copy Markdown

I think this should be fixed since NixOS/nixpkgs#547077 (and another related fix that came before it).

@graham33 Maybe the agent could benefit from a "check pending nixpkgs updates for relevant changes" memory? :)

@graham33

Copy link
Copy Markdown
Owner

I think this should be fixed since NixOS/nixpkgs#547077 (and another related fix that came before it).

@graham33 Maybe the agent could benefit from a "check pending nixpkgs updates for relevant changes" memory? :)

Oh nice, thanks! Yes probably, although in this case I'm trying to stick with a reasonably 'known good' nixpkgs pin, so I'd probably want to bump nixpkgs in a separate change, since it's a fairly expensive rebuild/retest. In this case I just happen to need the USB image and found it broken (need proper CI...).

Ideally I would have this all building and testing better in CI, and then have an agent auto-generating PRs to bump nixpkgs etc. If I get time maybe that will happen at some point!

@graham33
graham33 merged commit 0ea5452 into main Jul 30, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants