NVIDIA: Difference between revisions

imported>Samuela
remove redundant legacy driver section
imported>Samuela
No edit summary
Line 1: Line 1:
= Installing NVIDIA official drivers =
= Installing NVIDIA official drivers on NixOS =
 
If you're using NixOS, installing and using the official NVIDIA drivers is as simple as,
{{file|/etc/nixos/configuration.nix|nix|<nowiki>
{{file|/etc/nixos/configuration.nix|nix|<nowiki>
{
{
Line 15: Line 15:
</nowiki>}}
</nowiki>}}


As noted in the comment, you'll need to determine the appropriate driver version for your card. For "legacy" cards, you can consult [https://www.nvidia.com/en-us/drivers/unix/legacy-gpu/ nvidia official legacy driver list]. You can consult the set of possible options in the source [https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/os-specific/linux/nvidia-x11/default.nix here].
As noted in the final comment, you'll need to determine the appropriate driver version for your card. For "legacy" cards, you can consult [https://www.nvidia.com/en-us/drivers/unix/legacy-gpu/ nvidia official legacy driver list]. You can consult the set of possible options in the source [https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/os-specific/linux/nvidia-x11/default.nix here].


= Using your GPU for compute =
= Using GPUs on non-NixOS =
If you're using Nix-packaged software on a non-NixOS system, you'll need a workaround to get everything up-and-running. The [https://github.com/guibou/nixGL nixGL project] provides wrapper to use GL drivers on non-NixOS systems. You need to have GPU drivers installed on your distro (for kernel modules). With nixGL installed, you'll run <code>nixGL foobar</code> instead of  <code>foobar</code>.
 
Note that nixGL is not specific to NVIDIA GPUs, and should work with just about any GPU.
 
= CUDA and using your GPU for compute =
NixOS supports using NVIDIA GPUs for pure computing purposes, not just for graphics. For example, many users rely on NixOS for machine learning both locally and on cloud instances. These use cases are supported by the [https://github.com/orgs/NixOS/teams/cuda-maintainers @NixOS/cuda-maintainers team] on GitHub. If you have an issue using your NVIDIA GPU for computing purposes [https://github.com/nixos/nixpkgs/issues/new open an issue] on GitHub and tag @NixOS/cuda-maintainers.
NixOS supports using NVIDIA GPUs for pure computing purposes, not just for graphics. For example, many users rely on NixOS for machine learning both locally and on cloud instances. These use cases are supported by the [https://github.com/orgs/NixOS/teams/cuda-maintainers @NixOS/cuda-maintainers team] on GitHub. If you have an issue using your NVIDIA GPU for computing purposes [https://github.com/nixos/nixpkgs/issues/new open an issue] on GitHub and tag @NixOS/cuda-maintainers.


Line 265: Line 270:


Use option <syntaxHighlight lang="nix">hardware.bumblebee.enable = true;</syntaxHighlight>
Use option <syntaxHighlight lang="nix">hardware.bumblebee.enable = true;</syntaxHighlight>
== non-NixOS case ==
* The [https://github.com/guibou/nixGL nixGL project] provides wrapper to use GL drivers outside of NixOS. You need to have nvidia drivers installed on your distro (for kernel modules). Then supply nvidia driver version you use on host system to nixGL.


== CUDA ==
== CUDA ==