We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d769499 commit 9fff3e4Copy full SHA for 9fff3e4
nix-shell/cuda-shell.nix
@@ -0,0 +1,21 @@
1
+# Run with `nix-shell cuda-shell.nix`
2
+{ pkgs ? import <nixpkgs> {} }:
3
+pkgs.mkShell {
4
+ name = "cuda-env-shell";
5
+ buildInputs = with pkgs; [
6
+ git gitRepo gnupg autoconf curl
7
+ procps gnumake util-linux m4 gperf unzip
8
+ cudatoolkit linuxPackages.nvidia_x11
9
+ libGLU libGL
10
+ xorg.libXi xorg.libXmu freeglut
11
+ xorg.libXext xorg.libX11 xorg.libXv xorg.libXrandr zlib
12
+ ncurses5 stdenv.cc binutils
13
+ ];
14
+ shellHook = ''
15
+ export CUDA_PATH=${pkgs.cudatoolkit}
16
+ # export LD_LIBRARY_PATH=${pkgs.linuxPackages.nvidia_x11}/lib:${pkgs.ncurses5}/lib
17
+ export EXTRA_LDFLAGS="-L/lib -L${pkgs.linuxPackages.nvidia_x11}/lib"
18
+ export EXTRA_CCFLAGS="-I/usr/include"
19
+ '';
20
+}
21
+
0 commit comments