Skip to content

Commit 567b84d

Browse files
tehFRidh
authored andcommittedJul 17, 2017
python.pkgs.pytorch: init at 0.1.12
1 parent 8669fb1 commit 567b84d

File tree

2 files changed

+45
-0
lines changed

2 files changed

+45
-0
lines changed
 
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{ buildPythonPackage, fetchFromGitHub, lib, numpy, pyyaml, cffi, cmake,
2+
git, stdenv }:
3+
4+
buildPythonPackage rec {
5+
version = "0.1.12";
6+
pname = "pytorch";
7+
name = "${pname}-${version}";
8+
9+
src = fetchFromGitHub {
10+
owner = "pytorch";
11+
repo = "pytorch";
12+
rev = "v${version}";
13+
sha256 = "0r8mf4xya76gz83y5z3hfxh0rydkydafhipl8g7d0bfrgw961jy9";
14+
};
15+
16+
checkPhase = ''
17+
${stdenv.shell} test/run_test.sh
18+
'';
19+
20+
buildInputs = [
21+
cmake
22+
git
23+
numpy.blas
24+
];
25+
26+
propagatedBuildInputs = [
27+
cffi
28+
numpy
29+
pyyaml
30+
];
31+
32+
preConfigure = ''
33+
export NO_CUDA=1
34+
'';
35+
36+
meta = {
37+
description = "Tensors and Dynamic neural networks in Python with strong GPU acceleration.";
38+
homepage = http://pytorch.org/;
39+
license = lib.licenses.bsd3;
40+
platforms = lib.platforms.linux;
41+
maintainers = with lib.maintainers; [ teh ];
42+
};
43+
}

‎pkgs/top-level/python-packages.nix

+2
Original file line numberDiff line numberDiff line change
@@ -10762,6 +10762,8 @@ in {
1076210762
};
1076310763
};
1076410764

10765+
pytorch = callPackage ../development/python-modules/pytorch { };
10766+
1076510767
python_tvrage = buildPythonPackage (rec {
1076610768
version = "0.4.1";
1076710769
name = "tvrage-${version}";

0 commit comments

Comments
 (0)
Please sign in to comment.