CUDA: Difference between revisions
→cudatoolkit, cudnn, and related packages: Updated broken links to cuDNN and cuTENSOR, please verify. Update date refers to the last verification, not example updates. |
|||
(2 intermediate revisions by 2 users not shown) | |||
Line 10: | Line 10: | ||
Several "CUDA-X" libraries are packages as well. In particular, | Several "CUDA-X" libraries are packages as well. In particular, | ||
* cuDNN is packaged [https://github.com/NixOS/nixpkgs/ | * cuDNN is packaged [https://github.com/NixOS/nixpkgs/tree/master/pkgs/development/cuda-modules/cudnn here]. | ||
* cuTENSOR is packaged [https://github.com/NixOS/nixpkgs/ | * cuTENSOR is packaged [https://github.com/NixOS/nixpkgs/tree/master/pkgs/development/cuda-modules/cutensor here]. | ||
{{warning|1=Note that these examples | {{warning|1=Note that these examples have been updated more recently (as of 2024-07-30). May not be the best solution. A better resource is likely the packaging CUDA sample code [https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/cuda-modules/cuda-library-samples/generic.nix here].}} | ||
There are some possible ways to setup a development environment using CUDA on NixOS. This can be accomplished in the following ways: | There are some possible ways to setup a development environment using CUDA on NixOS. This can be accomplished in the following ways: | ||
Line 82: | Line 82: | ||
== Setting up CUDA Binary Cache == | == Setting up CUDA Binary Cache == | ||
The [https://app.cachix.org/cache/cuda-maintainers cuda-maintainers] cache contains pre-built CUDA packages. By adding it to your system, Nix will fetch these packages instead of building them, saving valuable time and processing power. | |||
For more information, refer to the [[Binary Cache#Using a binary cache Using a binary cache|Using a binary cache]] page. | For more information, refer to the [[Binary Cache#Using a binary cache Using a binary cache|Using a binary cache]] page. | ||
Line 89: | Line 91: | ||
=== NixOS === | === NixOS === | ||
Add the | Add the cache to <code>substituters</code> and <code>trusted-public-keys</code> inside your system configuration: | ||
{{file|/etc/nixos/configuration.nix|nix|<nowiki> | {{file|/etc/nixos/configuration.nix|nix|<nowiki> |