nixpkgs/pkgs/development/python-modules/pytorch/default.nix

44 lines
871 B
Nix
Raw Normal View History

2017-07-16 19:15:05 +00:00
{ buildPythonPackage, fetchFromGitHub, lib, numpy, pyyaml, cffi, cmake,
git, stdenv }:
buildPythonPackage rec {
2017-08-19 01:22:23 +00:00
version = "0.2.0";
2017-07-16 19:15:05 +00:00
pname = "pytorch";
name = "${pname}-${version}";
src = fetchFromGitHub {
2017-08-19 01:22:23 +00:00
owner = "pytorch";
repo = "pytorch";
rev = "v${version}";
2017-11-22 22:02:34 +00:00
sha256 = "1s3f46ga1f4lfrcj3lpvvhgkdr1pi8i2hjd9xj9qiz3a9vh2sj4n";
2017-07-16 19:15:05 +00:00
};
checkPhase = ''
${stdenv.shell} test/run_test.sh
'';
buildInputs = [
cmake
git
numpy.blas
];
2017-11-22 22:02:34 +00:00
2017-07-16 19:15:05 +00:00
propagatedBuildInputs = [
cffi
numpy
pyyaml
];
preConfigure = ''
export NO_CUDA=1
'';
2017-11-22 22:02:34 +00:00
2017-07-16 19:15:05 +00:00
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 ];
};
}