-
Notifications
You must be signed in to change notification settings - Fork 0
/
shell.nix
48 lines (47 loc) · 1013 Bytes
/
shell.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
{ pkgs ? import <nixpkgs> {} }:
pkgs.stdenv.mkDerivation {
name = "cuda-env-shell";
propagatedBuildInputs = with pkgs; [
autoconf
binutils
cudatoolkit
curl
freeglut
git
gitRepo
gnumake
gnupg
gperf
gcc11
linuxPackages.nvidia_x11
m4
ncurses5
pam
procps
python310Packages.eventlet
python310Packages.flask-socketio
python310Packages.python-socketio
python310Packages.gevent
python310Packages.psycopg2
python310Packages.pytorch-bin
stdenv.cc
stdenv.cc.cc.lib
unzip
utillinux
xorg.libX11
xorg.libXext
xorg.libXi
xorg.libXmu
xorg.libXrandr
xorg.libXv
zlib
];
shellHook = ''
export CUDA_PATH=${pkgs.cudatoolkit}
export EXTRA_LDFLAGS="-L/lib -L${pkgs.linuxPackages.nvidia_x11}/lib"
export EXTRA_CCFLAGS="-I/usr/include"
export CC="${pkgs.gcc11}/bin/gcc"
export PATH="${pkgs.python311Packages.pytorch-bin}/bin/python:$PATH"
source .venv/bin/activate
'';
}