From 2bece06f10416a923dfe78d905435be5f994b7d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torjus=20H=C3=A5kestad?= Date: Mon, 15 Jul 2024 15:25:06 +0200 Subject: [PATCH] Add workaround for onnxruntime with cuda --- home/programs/obs-studio/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/home/programs/obs-studio/default.nix b/home/programs/obs-studio/default.nix index 447a6b4..34afa89 100644 --- a/home/programs/obs-studio/default.nix +++ b/home/programs/obs-studio/default.nix @@ -1,9 +1,15 @@ { pkgs, lib, osConfig, ... }: let withCuda = if (osConfig.system.name == "gunter") then true else false; + onnxruntime-gpu = (pkgs.onnxruntime.override { cudaSupport = withCuda; + }).overrideAttrs (old: { + # TODO: Remove when fixed in nixpkgs + # https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/development/libraries/onnxruntime/default.nix#L154 + buildInputs = old.buildInputs ++ [ pkgs.cudaPackages.nccl ]; }); + obs-backgrounremoval-gpu = ((pkgs.obs-studio-plugins.obs-backgroundremoval.override { onnxruntime = onnxruntime-gpu; }).overrideAttrs (old: {