about summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorTom Hunger <tehunger@gmail.com>2017-07-16 20:15:05 +0100
committerFrederik Rietdijk <fridh@fridh.nl>2017-07-17 14:08:15 +0200
commit567b84dd50f9800f8563793946ca6fb99dc71777 (patch)
tree23b6bfac8fd306d018b42e15e475f10b6ea1aa9b /pkgs/development
parent8669fb1f96cfd68ed68d9d76ff1f0237d4d96748 (diff)
python.pkgs.pytorch: init at 0.1.12
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/python-modules/pytorch/default.nix43
1 files changed, 43 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/pytorch/default.nix b/pkgs/development/python-modules/pytorch/default.nix
new file mode 100644
index 0000000000000..2088b2e0b103f
--- /dev/null
+++ b/pkgs/development/python-modules/pytorch/default.nix
@@ -0,0 +1,43 @@
+{ buildPythonPackage, fetchFromGitHub, lib, numpy, pyyaml, cffi, cmake,
+  git, stdenv }:
+
+buildPythonPackage rec {
+  version = "0.1.12";
+  pname = "pytorch";
+  name = "${pname}-${version}";
+
+  src = fetchFromGitHub {
+    owner = "pytorch";
+    repo = "pytorch";
+    rev = "v${version}";
+    sha256 = "0r8mf4xya76gz83y5z3hfxh0rydkydafhipl8g7d0bfrgw961jy9";
+  };
+
+  checkPhase = ''
+    ${stdenv.shell} test/run_test.sh
+  '';
+
+  buildInputs = [
+     cmake
+     git
+     numpy.blas
+  ];
+  
+  propagatedBuildInputs = [
+    cffi
+    numpy
+    pyyaml
+  ];
+
+  preConfigure = ''
+    export NO_CUDA=1
+  '';
+  
+  meta = {
+    description = "Tensors and Dynamic neural networks in Python with strong GPU acceleration.";
+    homepage = http://pytorch.org/;
+    license = lib.licenses.bsd3;
+    platforms = lib.platforms.linux;
+    maintainers = with lib.maintainers; [ teh ];
+  };
+}