locaal-ai/obs-backgroundremoval

Nix build fails with "Specify CUDA_TOOLKIT_ROOT_DIR" even though DISABLE_ONNXRUNTIME_GPU is ON

Zahrun opened this issue · 1 comments

Describe the bug

If CUDA is enabled in NixOS, Nix cmake build fails in FindCUDA with "Specify CUDA_TOOLKIT_ROOT_DIR" even though DISABLE_ONNXRUNTIME_GPU is ON

See NixOS/nixpkgs#335605

To Reproduce

  1. Enable CUDA, CUDNN and unfree pacakges via
 nixpkgs.config = {
   allowUnfree = true;
   cudaSupport = true;
   cudnnSupport = true;
 };
2. Add CUDA-Toolkit and CUDNN to Sytem-Packages
cudaPackages.cudatoolkit
cudaPackages.cudnn
3. Add OBS and plugins to packages via
(pkgs.wrapOBS {
  plugins = with pkgs.obs-studio-plugins; [
    waveform
    wlrobs
    obs-backgroundremoval
    obs-pipewire-audio-capture
  ];
})

Log

https://gist.github.com/RedEtherbloom/f427920f2f37f779ebdab5943e254363

Additional context

All other packages build normally.
OBS builds normally if we remove obs-backgroundremoval from the plugin list.

Any idea why cmake is trying FindCUDA even though DISABLE_ONNXRUNTIME_GPU is ON?