pythonPackages.Theano: move and rename variants
We have two derivations, one that supports Cuda, and one that does not. The names, TheanoWithCuda and TheanoWithoutCuda, now reflect that. Furthermore, a boolean passthru.cudaSupport was added. In the future the two derivations should be merged in one, with a parameter `cudaSupport`.
This commit is contained in:
parent
2605149d15
commit
07dcc4f43a
@ -1,6 +1,5 @@
|
|||||||
{ buildPythonPackage
|
{ buildPythonPackage
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, blas
|
|
||||||
, numpy
|
, numpy
|
||||||
, six
|
, six
|
||||||
, scipy
|
, scipy
|
||||||
@ -45,7 +44,7 @@ buildPythonPackage rec {
|
|||||||
dontStrip = true;
|
dontStrip = true;
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
blas
|
numpy.blas
|
||||||
numpy
|
numpy
|
||||||
six
|
six
|
||||||
scipy
|
scipy
|
||||||
@ -59,4 +58,5 @@ buildPythonPackage rec {
|
|||||||
libgpuarray
|
libgpuarray
|
||||||
] ++ (stdenv.lib.optional (cudnn != null) [ cudnn ]);
|
] ++ (stdenv.lib.optional (cudnn != null) [ cudnn ]);
|
||||||
|
|
||||||
|
passthru.cudaSupport = true;
|
||||||
}
|
}
|
@ -0,0 +1,44 @@
|
|||||||
|
{ stdenv
|
||||||
|
, fetchurl
|
||||||
|
, buildPythonPackage
|
||||||
|
, isPyPy
|
||||||
|
, pythonOlder
|
||||||
|
, isPy3k
|
||||||
|
, nose
|
||||||
|
, numpy
|
||||||
|
, pydot_ng
|
||||||
|
, scipy
|
||||||
|
, six
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
name = "Theano-0.8.2";
|
||||||
|
|
||||||
|
disabled = isPyPy || pythonOlder "2.6" || (isPy3k && pythonOlder "3.3");
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
url = "mirror://pypi/T/Theano/${name}.tar.gz";
|
||||||
|
sha256 = "7463c8f7ed1a787bf881f36d38a38607150186697e7ce7e78bfb94b7c6af8930";
|
||||||
|
};
|
||||||
|
|
||||||
|
#preCheck = ''
|
||||||
|
# mkdir -p check-phase
|
||||||
|
# export HOME=$(pwd)/check-phase
|
||||||
|
#'';
|
||||||
|
doCheck = false;
|
||||||
|
# takes far too long, also throws "TypeError: sort() missing 1 required positional argument: 'a'"
|
||||||
|
# when run from the installer, and testing with Python 3.5 hits github.com/Theano/Theano/issues/4276,
|
||||||
|
# the fix for which hasn't been merged yet.
|
||||||
|
|
||||||
|
# keep Nose around since running the tests by hand is possible from Python or bash
|
||||||
|
propagatedBuildInputs = [ stdenv nose numpy numpy.blas pydot_ng scipy six ];
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
homepage = http://deeplearning.net/software/theano/;
|
||||||
|
description = "A Python library for large-scale array computation";
|
||||||
|
license = stdenv.lib.licenses.bsd3;
|
||||||
|
maintainers = [ stdenv.lib.maintainers.bcdarwin ];
|
||||||
|
};
|
||||||
|
|
||||||
|
passthru.cudaSupport = false;
|
||||||
|
}
|
@ -23350,37 +23350,11 @@ in {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
Theano = buildPythonPackage rec {
|
Theano = self.TheanoWithoutCuda;
|
||||||
name = "Theano-0.8.2";
|
|
||||||
|
|
||||||
disabled = isPyPy || pythonOlder "2.6" || (isPy3k && pythonOlder "3.3");
|
TheanoWithoutCuda = callPackage ../development/python-modules/Theano/theano-without-cuda { };
|
||||||
|
|
||||||
src = pkgs.fetchurl {
|
TheanoWithCuda = callPackage ../development/python-modules/Theano/theano-with-cuda (
|
||||||
url = "mirror://pypi/T/Theano/${name}.tar.gz";
|
|
||||||
sha256 = "7463c8f7ed1a787bf881f36d38a38607150186697e7ce7e78bfb94b7c6af8930";
|
|
||||||
};
|
|
||||||
|
|
||||||
#preCheck = ''
|
|
||||||
# mkdir -p check-phase
|
|
||||||
# export HOME=$(pwd)/check-phase
|
|
||||||
#'';
|
|
||||||
doCheck = false;
|
|
||||||
# takes far too long, also throws "TypeError: sort() missing 1 required positional argument: 'a'"
|
|
||||||
# when run from the installer, and testing with Python 3.5 hits github.com/Theano/Theano/issues/4276,
|
|
||||||
# the fix for which hasn't been merged yet.
|
|
||||||
|
|
||||||
# keep Nose around since running the tests by hand is possible from Python or bash
|
|
||||||
propagatedBuildInputs = [ stdenv ] ++ (with self; [ nose numpy numpy.blas pydot_ng scipy six ]);
|
|
||||||
|
|
||||||
meta = {
|
|
||||||
homepage = http://deeplearning.net/software/theano/;
|
|
||||||
description = "A Python library for large-scale array computation";
|
|
||||||
license = stdenv.lib.licenses.bsd3;
|
|
||||||
maintainers = [ maintainers.bcdarwin ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
Theano-cuda = callPackage ../development/python-modules/theano/cuda (
|
|
||||||
let
|
let
|
||||||
boost = pkgs.boost159.override {
|
boost = pkgs.boost159.override {
|
||||||
inherit (self) python numpy scipy;
|
inherit (self) python numpy scipy;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user