pythonPackages.tensorflow 1.1 -> 1.3

This commit is contained in:
Jean-Philippe Bernardy 2017-09-11 11:23:40 +02:00 committed by Nikolay Amiantov
parent 08b827ae8e
commit 01d53df77f
2 changed files with 26 additions and 34 deletions

View File

@ -1,7 +1,7 @@
{ stdenv
, fetchurl
, buildPythonPackage
, isPy36, isPy35, isPy27
, isPy36, isPy27
, cudaSupport ? false
, cudatoolkit ? null
, cudnn ? null
@ -9,9 +9,8 @@
, numpy
, six
, protobuf
, swig
, werkzeug
, mock
, backports_weakref
, zlib
}:
@ -29,10 +28,10 @@ assert ! (stdenv.isDarwin && cudaSupport);
buildPythonPackage rec {
pname = "tensorflow";
version = "1.1.0";
version = "1.3.0";
name = "${pname}-${version}";
format = "wheel";
disabled = ! (isPy36 || isPy35 || isPy27);
disabled = ! (isPy36 || isPy27);
src = let
tfurl = sys: proc: pykind:
@ -47,59 +46,45 @@ buildPythonPackage rec {
darwin.cpu = {
py2 = {
url = tfurl "mac" "cpu" "py2-none-any" ;
sha256 = "1fgf26lw0liqxc9pywc8y2mj8l1mv48nhkav0pag9vavdacb9mqr";
sha256 = "0nkymqbqjx8rsmc8vkc26cfsg4hpr6lj9zrwhjnfizvkzbbsh5z4";
};
py3 = {
url = tfurl "mac" "cpu" "py3-none-any" ;
sha256 = "0z5p1fra7bih0vqn618i2w3vyy8d1rkc72k7bmjq0rw8msl717ia";
sha256 = "1rj4m817w3lajnb1lgn3bwfwwk3qwvypyx11dim1ybakbmsc1j20";
};
};
linux-x86_64.cpu = {
py2 = {
url = tfurl "linux" "cpu" "cp27-none-linux_x86_64";
sha256 = "0ld3hqx3idxk0zcrvn3p9yqnmx09zsj3mw66jlfw6fkv5hznx8j2";
sha256 = "09pcyx0yfil4dm6cij8n3907pfgva07a38avrbai4qk5h6hxm8w9";
};
py35 = {
url = tfurl "linux" "cpu" "cp35-cp35m-linux_x86_64";
sha256 = "0ahz9222rzqrk43lb9w4m351klkm6mlnnvw8xfqip28vbmymw90b";
};
py36 = {
py3 = {
url = tfurl "linux" "cpu" "cp36-cp36m-linux_x86_64";
sha256 = "1a2cc8ihl94iqff76nxg6bq85vfb7sj5cvvi9sxy2f43k32fi4lv";
sha256 = "1qm8lm2f6bf9d462ybgwrz0dn9i6cnisgwdvyq9ssmy2f1gp8hxk";
};
};
linux-x86_64.cuda = {
py2 = {
url = tfurl "linux" "gpu" "cp27-none-linux_x86_64";
sha256 = "1baa9jwr6f8f62dyx6isbw8yyrd0pi1dz1srjblfqsyk1x3pnfvh";
sha256 = "10yyyn4g2fsv1xgmw99bbr0fg7jvykay4gb5pxrrylh7h38h6wah";
};
py35 = {
url = tfurl "linux" "gpu" "cp35-cp35m-linux_x86_64";
sha256 = "0606m2awy0ifhniy8lsyhd0xc388dgrwksn87989xlgy90wpxi92";
};
py36 = {
py3 = {
url = tfurl "linux" "gpu" "cp36-cp36m-linux_x86_64";
sha256 = "0lvbmfa87qzrajadpsf13gi3l71vryzkryzqfvkykivqrdjsvj8q";
sha256 = "12g3akkr083gs3sisjbmm0lpsk8phn3dvy7jjfadfxshqc7za14i";
};
};
};
in
fetchurl (
if stdenv.isDarwin then
if isPy27 then
dls.darwin.cpu.py2
else
if isPy36 then
dls.darwin.cpu.py3
else
dls.darwin.cpu.py2
else if isPy36 then
if cudaSupport then
dls.linux-x86_64.cuda.py36
else dls.linux-x86_64.cpu.py36
else if isPy35 then
if cudaSupport then
dls.linux-x86_64.cuda.py35
else dls.linux-x86_64.cpu.py35
dls.linux-x86_64.cuda.py3
else dls.linux-x86_64.cpu.py3
else
if cudaSupport then
dls.linux-x86_64.cuda.py2
@ -108,9 +93,16 @@ buildPythonPackage rec {
);
propagatedBuildInputs = with stdenv.lib;
[ numpy six protobuf swig werkzeug mock ]
[ numpy six protobuf mock ]
++ optionals cudaSupport [ cudatoolkit cudnn stdenv.cc ];
installFlags = "--no-dependencies";
# tensorflow-gpu depends on tensorflow_tensorboard, which cannot be
# built at the moment (some of its dependencies do not build
# [htlm5lib9999999 (seven nines) -> tensorboard], and it depends on an old version of
# bleach) Hence we disable dependency checking for now.
# Note that we need to run *after* the fixup phase because the
# libraries are loaded at runtime. If we run in preFixup then
# patchelf --shrink-rpath will remove the cuda libraries.

View File

@ -26057,7 +26057,7 @@ EOF
tensorflowWithCuda = callPackage ../development/python-modules/tensorflow {
cudaSupport = true;
cudatoolkit = pkgs.cudatoolkit8;
cudnn = pkgs.cudnn51_cudatoolkit80;
cudnn = pkgs.cudnn60_cudatoolkit80;
};
tflearn = buildPythonPackage rec {