Commit ed11acb4 authored by Edward Tjörnhammar's avatar Edward Tjörnhammar
Browse files

nixos/slurm: expose NVML library when NVIDIA datacenter is enabled

When `hardware.nvidia.datacenter.enable` is turned on we likely want the
NVIDIA Management Library (NVML) at runtime so that Slurm can query GPU
metrics. This adds the driver directory containing `libnvidia‑ml.so` to
`slurmd` environment's `LD_LIBRARY_PATH`, making it discoverable.
parent dd0db5bc
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -453,6 +453,8 @@ in
        users.groups.slurmrestd = lib.mkIf (cfg.rest.enable) { };

        systemd.services.slurmd = lib.mkIf (cfg.client.enable) {

          environment.LD_LIBRARY_PATH = lib.mkIf config.hardware.nvidia.datacenter.enable "/run/opengl-driver/lib";
          path =
            with pkgs;
            [