Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1/*
2 Test CUDA packages.
3
4 This release file is currently not tested on hydra.nixos.org
5 because it requires unfree software, but it is tested by
6 https://hydra.nix-community.org/jobset/nixpkgs/cuda-nixos-unstable.
7
8 Cf. https://github.com/nix-community/infra/pull/1335
9
10 Test for example like this:
11
12 $ hydra-eval-jobs pkgs/top-level/release-cuda.nix -I .
13*/
14
15let
16 lib = import ../../lib;
17 cudaLib = (import ../development/cuda-modules/_cuda).lib;
18in
19
20{
21 # The platforms for which we build Nixpkgs.
22 supportedSystems ? [
23 "x86_64-linux"
24 "aarch64-linux"
25 ],
26 variant ? "cuda",
27 # Attributes passed to nixpkgs.
28 nixpkgsArgs ? {
29 config = {
30 allowUnfreePredicate = cudaLib.allowUnfreeCudaPredicate;
31 "${variant}Support" = true;
32 inHydra = true;
33
34 # Don't evaluate duplicate and/or deprecated attributes
35 allowAliases = false;
36 };
37
38 __allowFileset = false;
39 },
40 ...
41}@args:
42
43assert builtins.elem variant [
44 "cuda"
45 "rocm"
46 null
47];
48
49let
50 mkReleaseLib = import ./release-lib.nix;
51 release-lib = mkReleaseLib (
52 { inherit supportedSystems nixpkgsArgs; } // lib.intersectAttrs (lib.functionArgs mkReleaseLib) args
53 );
54
55 inherit (release-lib)
56 linux
57 mapTestOn
58 packagePlatforms
59 pkgs
60 ;
61
62 # Package sets to evaluate whole
63 # Derivations from these package sets are selected based on the value
64 # of their meta.{hydraPlatforms,platforms,badPlatforms} attributes
65 autoPackageSets = builtins.filter (lib.strings.hasPrefix "cudaPackages") (builtins.attrNames pkgs);
66 autoPackagePlatforms = lib.genAttrs autoPackageSets (pset: packagePlatforms pkgs.${pset});
67
68 # Explicitly select additional packages to also evaluate
69 # The desired platforms must be set explicitly here
70 explicitPackagePlatforms =
71 # This comment prevents nixfmt from changing the indentation level, lol
72 {
73 blas = linux;
74 blender = linux;
75 faiss = linux;
76 lapack = linux;
77 magma = linux;
78 mpich = linux;
79 openmpi = linux;
80 ucx = linux;
81
82 opencv = linux;
83 cctag = linux; # Failed in https://github.com/NixOS/nixpkgs/pull/233581
84
85 cholmod-extra = linux;
86 colmap = linux;
87 ctranslate2 = linux;
88 ffmpeg-full = linux;
89 gimp = linux;
90 gimp3 = linux;
91 gpu-screen-recorder = linux;
92 gst_all_1.gst-plugins-bad = linux;
93 jellyfin-ffmpeg = linux;
94 kdePackages.kdenlive = linux;
95 lightgbm = linux;
96 llama-cpp = linux;
97 meshlab = linux;
98 mistral-rs = linux;
99 monado = linux; # Failed in https://github.com/NixOS/nixpkgs/pull/233581
100 noisetorch = linux;
101 obs-studio-plugins.obs-backgroundremoval = linux;
102 octave = linux; # because depend on SuiteSparse which need rebuild when cuda enabled
103 ollama = linux;
104 onnxruntime = linux;
105 openmvg = linux;
106 openmvs = linux;
107 opentrack = linux;
108 openvino = linux;
109 pixinsight = linux; # Failed in https://github.com/NixOS/nixpkgs/pull/233581
110 qgis = linux;
111 rtabmap = linux;
112 saga = linux;
113 suitesparse = linux;
114 sunshine = linux;
115 truecrack-cuda = linux;
116 tts = linux;
117 ueberzugpp = linux; # Failed in https://github.com/NixOS/nixpkgs/pull/233581
118 wyoming-faster-whisper = linux;
119 xgboost = linux;
120
121 python3Packages = {
122 catboost = linux;
123 cupy = linux;
124 faiss = linux;
125 faster-whisper = linux;
126 flashinfer = linux;
127 flax = linux;
128 gpt-2-simple = linux;
129 grad-cam = linux;
130 jaxlib = linux;
131 jax = linux;
132 keras = linux;
133 kornia = linux;
134 mmcv = linux;
135 mxnet = linux;
136 numpy = linux; # Only affected by MKL?
137 onnx = linux;
138 triton = linux;
139 openai-whisper = linux;
140 opencv4 = linux;
141 opensfm = linux;
142 pycuda = linux;
143 pymc = linux;
144 pyrealsense2WithCuda = linux;
145 pytorch-lightning = linux;
146 scikit-image = linux;
147 scikit-learn = linux; # Only affected by MKL?
148 scipy = linux; # Only affected by MKL?
149 spacy-transformers = linux;
150 tensorflow = linux;
151 tensorflow-probability = linux;
152 tesserocr = linux;
153 tiny-cuda-nn = linux;
154 torchaudio = linux;
155 torch = linux;
156 torchvision = linux;
157 transformers = linux;
158 ttstokenizer = linux;
159 vidstab = linux;
160 vllm = linux;
161 };
162 };
163
164 # Explicitly specified platforms take precedence over the platforms
165 # automatically inferred in autoPackagePlatforms
166 allPackagePlatforms = lib.recursiveUpdate autoPackagePlatforms explicitPackagePlatforms;
167 jobs = mapTestOn allPackagePlatforms;
168in
169jobs