1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-13 16:15:30 +00:00
nixpkgs/pkgs/development/python-modules/pytorch/default.nix

44 lines
875 B
Nix
Raw Normal View History

2017-07-16 20:15:05 +01:00
{ buildPythonPackage, fetchFromGitHub, lib, numpy, pyyaml, cffi, cmake,
git, stdenv }:
buildPythonPackage rec {
2017-08-19 02:22:23 +01:00
version = "0.2.0";
2017-07-16 20:15:05 +01:00
pname = "pytorch";
name = "${pname}-${version}";
src = fetchFromGitHub {
2017-08-19 02:22:23 +01:00
owner = "pytorch";
repo = "pytorch";
rev = "v${version}";
sha256 = "112mp3r70d8f15dhxm6k7912b5i6c2q8hv9462s808y84grr2jdm";
2017-07-16 20:15:05 +01:00
};
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 ];
};
}