nixpkgs/pkgs/os-specific/linux/nvidia-x11/fabricmanager.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

47 lines
1.4 KiB
Nix
Raw Normal View History

nvidia,nixos/nvidia: add datacenter drivers compatible with default cudaPkgs For NVLink topology systems we need fabricmanager. Fabricmanager itself is dependent on the datacenter driver set and not the regular x11 ones, it is also tightly tied to the driver version. Furhtermore the current cudaPackages defaults to version 11.8, which corresponds to the 520 datacenter drivers. Future improvement should be to switch the main nvidia datacenter driver version on the `config.cudaVersion` since these are well known from: > https://docs.nvidia.com/deploy/cuda-compatibility/index.html#use-the-right-compat-package This adds nixos configuration options `hardware.nvidia.datacenter.enable` and `hardware.nvidia.datacenter.settings` (the settings configure fabricmanager) Other interesting external links related to this commit are: * Fabricmanager download site: - https://developer.download.nvidia.com/compute/cuda/redist/fabricmanager/linux-x86_64/ * Data Center drivers: - https://www.nvidia.com/Download/driverResults.aspx/193711/en-us/ Implementation specific details: * Fabricmanager is added as a passthru package, similar to settings and presistenced. * Adds `use{Settings,Persistenced,Fabricmanager}` with defaults to preserve x11 expressions. * Utilizes mkMerge to split the `hardware.nvidia` module into three comment delimited sections: 1. Common 2. X11/xorg 3. Data Center * Uses asserts to make the configurations mutualy exclusive. Notes: * Data Center Drivers are `x86_64` only. * Reuses the `nvidia_x11` attribute in nixpkgs on enable, e.g. doesn't change it to `nvidia_driver` and sets that to either `nvidia_x11` or `nvidia_dc`. * Should have a helper function which is switched on `config.cudaVersion` like `selectHighestVersion` but rather `selectCudaCompatibleVersion`.
2023-09-11 14:37:26 +00:00
nvidia_x11: sha256:
{ stdenv, lib, fetchurl, patchelf }:
let
sys = lib.concatStringsSep "-" (lib.reverseList (lib.splitString "-" stdenv.system));
nvidia,nixos/nvidia: add datacenter drivers compatible with default cudaPkgs For NVLink topology systems we need fabricmanager. Fabricmanager itself is dependent on the datacenter driver set and not the regular x11 ones, it is also tightly tied to the driver version. Furhtermore the current cudaPackages defaults to version 11.8, which corresponds to the 520 datacenter drivers. Future improvement should be to switch the main nvidia datacenter driver version on the `config.cudaVersion` since these are well known from: > https://docs.nvidia.com/deploy/cuda-compatibility/index.html#use-the-right-compat-package This adds nixos configuration options `hardware.nvidia.datacenter.enable` and `hardware.nvidia.datacenter.settings` (the settings configure fabricmanager) Other interesting external links related to this commit are: * Fabricmanager download site: - https://developer.download.nvidia.com/compute/cuda/redist/fabricmanager/linux-x86_64/ * Data Center drivers: - https://www.nvidia.com/Download/driverResults.aspx/193711/en-us/ Implementation specific details: * Fabricmanager is added as a passthru package, similar to settings and presistenced. * Adds `use{Settings,Persistenced,Fabricmanager}` with defaults to preserve x11 expressions. * Utilizes mkMerge to split the `hardware.nvidia` module into three comment delimited sections: 1. Common 2. X11/xorg 3. Data Center * Uses asserts to make the configurations mutualy exclusive. Notes: * Data Center Drivers are `x86_64` only. * Reuses the `nvidia_x11` attribute in nixpkgs on enable, e.g. doesn't change it to `nvidia_driver` and sets that to either `nvidia_x11` or `nvidia_dc`. * Should have a helper function which is switched on `config.cudaVersion` like `selectHighestVersion` but rather `selectCudaCompatibleVersion`.
2023-09-11 14:37:26 +00:00
bsys = builtins.replaceStrings ["_"] ["-"] sys;
fmver = nvidia_x11.version;
in
stdenv.mkDerivation rec {
pname = "fabricmanager";
version = fmver;
src = fetchurl {
2023-12-15 11:20:42 +00:00
url = "https://developer.download.nvidia.com/compute/nvidia-driver/redist/fabricmanager/" +
nvidia,nixos/nvidia: add datacenter drivers compatible with default cudaPkgs For NVLink topology systems we need fabricmanager. Fabricmanager itself is dependent on the datacenter driver set and not the regular x11 ones, it is also tightly tied to the driver version. Furhtermore the current cudaPackages defaults to version 11.8, which corresponds to the 520 datacenter drivers. Future improvement should be to switch the main nvidia datacenter driver version on the `config.cudaVersion` since these are well known from: > https://docs.nvidia.com/deploy/cuda-compatibility/index.html#use-the-right-compat-package This adds nixos configuration options `hardware.nvidia.datacenter.enable` and `hardware.nvidia.datacenter.settings` (the settings configure fabricmanager) Other interesting external links related to this commit are: * Fabricmanager download site: - https://developer.download.nvidia.com/compute/cuda/redist/fabricmanager/linux-x86_64/ * Data Center drivers: - https://www.nvidia.com/Download/driverResults.aspx/193711/en-us/ Implementation specific details: * Fabricmanager is added as a passthru package, similar to settings and presistenced. * Adds `use{Settings,Persistenced,Fabricmanager}` with defaults to preserve x11 expressions. * Utilizes mkMerge to split the `hardware.nvidia` module into three comment delimited sections: 1. Common 2. X11/xorg 3. Data Center * Uses asserts to make the configurations mutualy exclusive. Notes: * Data Center Drivers are `x86_64` only. * Reuses the `nvidia_x11` attribute in nixpkgs on enable, e.g. doesn't change it to `nvidia_driver` and sets that to either `nvidia_x11` or `nvidia_dc`. * Should have a helper function which is switched on `config.cudaVersion` like `selectHighestVersion` but rather `selectCudaCompatibleVersion`.
2023-09-11 14:37:26 +00:00
"${sys}/${pname}-${sys}-${fmver}-archive.tar.xz";
inherit sha256;
};
installPhase = ''
mkdir -p $out/{bin,share/nvidia-fabricmanager}
for bin in nv{-fabricmanager,switch-audit};do
${patchelf}/bin/patchelf \
--set-interpreter ${stdenv.cc.libc}/lib/ld-${bsys}.so.2 \
--set-rpath ${lib.makeLibraryPath [ stdenv.cc.libc ]} \
--shrink-rpath \
nvidia,nixos/nvidia: add datacenter drivers compatible with default cudaPkgs For NVLink topology systems we need fabricmanager. Fabricmanager itself is dependent on the datacenter driver set and not the regular x11 ones, it is also tightly tied to the driver version. Furhtermore the current cudaPackages defaults to version 11.8, which corresponds to the 520 datacenter drivers. Future improvement should be to switch the main nvidia datacenter driver version on the `config.cudaVersion` since these are well known from: > https://docs.nvidia.com/deploy/cuda-compatibility/index.html#use-the-right-compat-package This adds nixos configuration options `hardware.nvidia.datacenter.enable` and `hardware.nvidia.datacenter.settings` (the settings configure fabricmanager) Other interesting external links related to this commit are: * Fabricmanager download site: - https://developer.download.nvidia.com/compute/cuda/redist/fabricmanager/linux-x86_64/ * Data Center drivers: - https://www.nvidia.com/Download/driverResults.aspx/193711/en-us/ Implementation specific details: * Fabricmanager is added as a passthru package, similar to settings and presistenced. * Adds `use{Settings,Persistenced,Fabricmanager}` with defaults to preserve x11 expressions. * Utilizes mkMerge to split the `hardware.nvidia` module into three comment delimited sections: 1. Common 2. X11/xorg 3. Data Center * Uses asserts to make the configurations mutualy exclusive. Notes: * Data Center Drivers are `x86_64` only. * Reuses the `nvidia_x11` attribute in nixpkgs on enable, e.g. doesn't change it to `nvidia_driver` and sets that to either `nvidia_x11` or `nvidia_dc`. * Should have a helper function which is switched on `config.cudaVersion` like `selectHighestVersion` but rather `selectCudaCompatibleVersion`.
2023-09-11 14:37:26 +00:00
bin/$bin
done
mv bin/nv{-fabricmanager,switch-audit} $out/bin/.
for d in etc systemd share/nvidia;do
mv $d $out/share/nvidia-fabricmanager/.
done
for d in include lib;do
mv $d $out/.
done
'';
meta = {
nvidia,nixos/nvidia: add datacenter drivers compatible with default cudaPkgs For NVLink topology systems we need fabricmanager. Fabricmanager itself is dependent on the datacenter driver set and not the regular x11 ones, it is also tightly tied to the driver version. Furhtermore the current cudaPackages defaults to version 11.8, which corresponds to the 520 datacenter drivers. Future improvement should be to switch the main nvidia datacenter driver version on the `config.cudaVersion` since these are well known from: > https://docs.nvidia.com/deploy/cuda-compatibility/index.html#use-the-right-compat-package This adds nixos configuration options `hardware.nvidia.datacenter.enable` and `hardware.nvidia.datacenter.settings` (the settings configure fabricmanager) Other interesting external links related to this commit are: * Fabricmanager download site: - https://developer.download.nvidia.com/compute/cuda/redist/fabricmanager/linux-x86_64/ * Data Center drivers: - https://www.nvidia.com/Download/driverResults.aspx/193711/en-us/ Implementation specific details: * Fabricmanager is added as a passthru package, similar to settings and presistenced. * Adds `use{Settings,Persistenced,Fabricmanager}` with defaults to preserve x11 expressions. * Utilizes mkMerge to split the `hardware.nvidia` module into three comment delimited sections: 1. Common 2. X11/xorg 3. Data Center * Uses asserts to make the configurations mutualy exclusive. Notes: * Data Center Drivers are `x86_64` only. * Reuses the `nvidia_x11` attribute in nixpkgs on enable, e.g. doesn't change it to `nvidia_driver` and sets that to either `nvidia_x11` or `nvidia_dc`. * Should have a helper function which is switched on `config.cudaVersion` like `selectHighestVersion` but rather `selectCudaCompatibleVersion`.
2023-09-11 14:37:26 +00:00
homepage = "https://www.nvidia.com/object/unix.html";
description = "Fabricmanager daemon for NVLink intialization and control";
license = lib.licenses.unfreeRedistributable;
nvidia,nixos/nvidia: add datacenter drivers compatible with default cudaPkgs For NVLink topology systems we need fabricmanager. Fabricmanager itself is dependent on the datacenter driver set and not the regular x11 ones, it is also tightly tied to the driver version. Furhtermore the current cudaPackages defaults to version 11.8, which corresponds to the 520 datacenter drivers. Future improvement should be to switch the main nvidia datacenter driver version on the `config.cudaVersion` since these are well known from: > https://docs.nvidia.com/deploy/cuda-compatibility/index.html#use-the-right-compat-package This adds nixos configuration options `hardware.nvidia.datacenter.enable` and `hardware.nvidia.datacenter.settings` (the settings configure fabricmanager) Other interesting external links related to this commit are: * Fabricmanager download site: - https://developer.download.nvidia.com/compute/cuda/redist/fabricmanager/linux-x86_64/ * Data Center drivers: - https://www.nvidia.com/Download/driverResults.aspx/193711/en-us/ Implementation specific details: * Fabricmanager is added as a passthru package, similar to settings and presistenced. * Adds `use{Settings,Persistenced,Fabricmanager}` with defaults to preserve x11 expressions. * Utilizes mkMerge to split the `hardware.nvidia` module into three comment delimited sections: 1. Common 2. X11/xorg 3. Data Center * Uses asserts to make the configurations mutualy exclusive. Notes: * Data Center Drivers are `x86_64` only. * Reuses the `nvidia_x11` attribute in nixpkgs on enable, e.g. doesn't change it to `nvidia_driver` and sets that to either `nvidia_x11` or `nvidia_dc`. * Should have a helper function which is switched on `config.cudaVersion` like `selectHighestVersion` but rather `selectCudaCompatibleVersion`.
2023-09-11 14:37:26 +00:00
platforms = nvidia_x11.meta.platforms;
mainProgram = "nv-fabricmanager";
maintainers = with lib.maintainers; [ edwtjo ];
nvidia,nixos/nvidia: add datacenter drivers compatible with default cudaPkgs For NVLink topology systems we need fabricmanager. Fabricmanager itself is dependent on the datacenter driver set and not the regular x11 ones, it is also tightly tied to the driver version. Furhtermore the current cudaPackages defaults to version 11.8, which corresponds to the 520 datacenter drivers. Future improvement should be to switch the main nvidia datacenter driver version on the `config.cudaVersion` since these are well known from: > https://docs.nvidia.com/deploy/cuda-compatibility/index.html#use-the-right-compat-package This adds nixos configuration options `hardware.nvidia.datacenter.enable` and `hardware.nvidia.datacenter.settings` (the settings configure fabricmanager) Other interesting external links related to this commit are: * Fabricmanager download site: - https://developer.download.nvidia.com/compute/cuda/redist/fabricmanager/linux-x86_64/ * Data Center drivers: - https://www.nvidia.com/Download/driverResults.aspx/193711/en-us/ Implementation specific details: * Fabricmanager is added as a passthru package, similar to settings and presistenced. * Adds `use{Settings,Persistenced,Fabricmanager}` with defaults to preserve x11 expressions. * Utilizes mkMerge to split the `hardware.nvidia` module into three comment delimited sections: 1. Common 2. X11/xorg 3. Data Center * Uses asserts to make the configurations mutualy exclusive. Notes: * Data Center Drivers are `x86_64` only. * Reuses the `nvidia_x11` attribute in nixpkgs on enable, e.g. doesn't change it to `nvidia_driver` and sets that to either `nvidia_x11` or `nvidia_dc`. * Should have a helper function which is switched on `config.cudaVersion` like `selectHighestVersion` but rather `selectCudaCompatibleVersion`.
2023-09-11 14:37:26 +00:00
};
}