4 Commits

Author SHA1 Message Date
8d6735f799 Add cudainfo program to test CUDA
The cudainfo program checks that we can initialize the CUDA RT library
and communicate with the driver. It can be used as standalone program or
built with cudainfo.gpuCheck so it is executed inside the build sandbox
to see if it also works fine. It uses the autoAddDriverRunpath hook to
inject in the runpath the location of the library directory for CUDA
libraries.
2025-07-22 17:26:50 +02:00
60a2940618 Add missing symlink in cuda sandbox 2025-07-22 17:26:48 +02:00
8cd7b713ca Enable cuda systemFeature in raccoon and fox
This allows running derivations which depend on cuda runtime without
breaking the sandbox. We only need to add `requiredSystemFeatures = [ "cuda" ];`
to the derivation.

Reviewed-by: Rodrigo Arias Mallo <rodrigo.arias@bsc.es>
2025-07-22 17:07:13 +02:00
8eed90d2bd Move shared nvidia settings to a separate module
Reviewed-by: Rodrigo Arias Mallo <rodrigo.arias@bsc.es>
2025-07-22 17:06:45 +02:00

View File

@@ -4,10 +4,9 @@
, cudaPackages
, autoAddDriverRunpath
, strace
, cudainfo
}:
stdenv.mkDerivation {
stdenv.mkDerivation (finalAttrs: {
name = "cudainfo";
src = ./.;
buildInputs = [
@@ -24,7 +23,7 @@ stdenv.mkDerivation {
requiredSystemFeatures = [ "cuda" ];
dontBuild = true;
nativeCheckInputs = [
cudainfo
finalAttrs.finalPackage # The cudainfo package from above
strace # When it fails, it will show the trace
];
dontUnpack = true;
@@ -41,4 +40,4 @@ stdenv.mkDerivation {
'';
installPhase = "touch $out";
};
}
})