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.
This commit is contained in:
@@ -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;
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user