Archived
1
0
forked from rarias/bscpkgs

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.

Reviewed-by: Aleix Boné <abonerib@bsc.es>
This commit is contained in:
2025-07-22 15:24:55 +02:00
parent f2d8ee8552
commit 3269d763aa
5 changed files with 659 additions and 1 deletions

View File

@@ -1,4 +1,4 @@
{ lib, config, ... }:
{ lib, config, pkgs, ... }:
{
# Configure Nvidia driver to use with CUDA
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.production;
@@ -15,4 +15,6 @@
programs.nix-required-mounts.allowedPatterns.nvidia-gpu.paths = [
config.systemd.tmpfiles.settings.graphics-driver."/run/opengl-driver"."L+".argument
];
environment.systemPackages = [ pkgs.cudainfo ];
}