Skip to content

Commit

Permalink
python.pkgs.pytorch: init at 0.1.12
Browse files Browse the repository at this point in the history
  • Loading branch information
teh authored and FRidh committed Jul 17, 2017
1 parent 8669fb1 commit 567b84d
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
43 changes: 43 additions & 0 deletions 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 ];
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/python-packages.nix
Expand Up @@ -10762,6 +10762,8 @@ in {
};
};

pytorch = callPackage ../development/python-modules/pytorch { };

python_tvrage = buildPythonPackage (rec {
version = "0.4.1";
name = "tvrage-${version}";
Expand Down

0 comments on commit 567b84d

Please sign in to comment.