pythonPackages.cntk: refactor move to python-modules
This commit is contained in:
parent
ac2ec2ecc1
commit
24dc5c6781
38
pkgs/development/python-modules/cntk/default.nix
Normal file
38
pkgs/development/python-modules/cntk/default.nix
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
{ stdenv
|
||||||
|
, buildPythonPackage
|
||||||
|
, pkgs
|
||||||
|
, numpy
|
||||||
|
, scipy
|
||||||
|
, enum34
|
||||||
|
, protobuf
|
||||||
|
, pip
|
||||||
|
, python
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
inherit (pkgs.cntk) name version src meta;
|
||||||
|
|
||||||
|
buildInputs = [ pkgs.cntk pkgs.swig pkgs.openmpi ];
|
||||||
|
propagatedBuildInputs = [ numpy scipy enum34 protobuf pip ];
|
||||||
|
|
||||||
|
CNTK_LIB_PATH = "${pkgs.cntk}/lib";
|
||||||
|
CNTK_COMPONENT_VERSION = pkgs.cntk.version;
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
cd bindings/python
|
||||||
|
sed -i 's,"libmpi.so.12","${pkgs.openmpi}/lib/libmpi.so",g' cntk/train/distributed.py
|
||||||
|
'';
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
rm -rf $out/${python.sitePackages}/cntk/libs
|
||||||
|
ln -s ${pkgs.cntk}/lib $out/${python.sitePackages}/cntk/libs
|
||||||
|
# It's not installed for some reason.
|
||||||
|
cp cntk/cntk_py.py $out/${python.sitePackages}/cntk
|
||||||
|
'';
|
||||||
|
|
||||||
|
# Actual tests are broken.
|
||||||
|
checkPhase = ''
|
||||||
|
cd $NIX_BUILD_TOP
|
||||||
|
${python.interpreter} -c "import cntk"
|
||||||
|
'';
|
||||||
|
}
|
@ -1274,33 +1274,7 @@ in {
|
|||||||
|
|
||||||
CDDB = callPackage ../development/python-modules/cddb { };
|
CDDB = callPackage ../development/python-modules/cddb { };
|
||||||
|
|
||||||
cntk = buildPythonPackage rec {
|
cntk = callPackage ../development/python-modules/cntk { };
|
||||||
inherit (pkgs.cntk) name version src meta;
|
|
||||||
|
|
||||||
buildInputs = [ pkgs.cntk pkgs.swig pkgs.openmpi ];
|
|
||||||
propagatedBuildInputs = with self; [ numpy scipy enum34 protobuf pip ];
|
|
||||||
|
|
||||||
CNTK_LIB_PATH = "${pkgs.cntk}/lib";
|
|
||||||
CNTK_COMPONENT_VERSION = pkgs.cntk.version;
|
|
||||||
|
|
||||||
postPatch = ''
|
|
||||||
cd bindings/python
|
|
||||||
sed -i 's,"libmpi.so.12","${pkgs.openmpi}/lib/libmpi.so",g' cntk/train/distributed.py
|
|
||||||
'';
|
|
||||||
|
|
||||||
postInstall = ''
|
|
||||||
rm -rf $out/${python.sitePackages}/cntk/libs
|
|
||||||
ln -s ${pkgs.cntk}/lib $out/${python.sitePackages}/cntk/libs
|
|
||||||
# It's not installed for some reason.
|
|
||||||
cp cntk/cntk_py.py $out/${python.sitePackages}/cntk
|
|
||||||
'';
|
|
||||||
|
|
||||||
# Actual tests are broken.
|
|
||||||
checkPhase = ''
|
|
||||||
cd $NIX_BUILD_TOP
|
|
||||||
${python.interpreter} -c "import cntk"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
celery = callPackage ../development/python-modules/celery { };
|
celery = callPackage ../development/python-modules/celery { };
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user