diff options
Diffstat (limited to 'pkgs/development/python-modules/tensorflow')
-rw-r--r-- | pkgs/development/python-modules/tensorflow/default.nix | 73 |
1 files changed, 41 insertions, 32 deletions
diff --git a/pkgs/development/python-modules/tensorflow/default.nix b/pkgs/development/python-modules/tensorflow/default.nix index 5019f17f788a..ab604c173004 100644 --- a/pkgs/development/python-modules/tensorflow/default.nix +++ b/pkgs/development/python-modules/tensorflow/default.nix @@ -1,7 +1,8 @@ { stdenv +, lib , fetchurl , buildPythonPackage -, isPy36, isPy35, isPy27 +, isPy3k, isPy35, isPy36, isPy27 , cudaSupport ? false , cudatoolkit ? null , cudnn ? null @@ -9,10 +10,10 @@ , numpy , six , protobuf -, swig -, werkzeug , mock +, backports_weakref , zlib +, tensorflow-tensorboard }: assert cudaSupport -> cudatoolkit != null @@ -29,10 +30,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 = ! (isPy35 || isPy36 || isPy27); src = let tfurl = sys: proc: pykind: @@ -47,69 +48,77 @@ 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"; + sha256 = "0p10zcf41pi33bi025fibqkq9rpd3v0rrbdmc9i9yd7igy076a07"; }; py36 = { 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"; + sha256 = "0icwnhkcf3fxr6bmbihqzipnn4pxybd06qv7l3k0p4xdgycwzmzk"; }; py36 = { 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 isPy3k then dls.darwin.cpu.py3 - 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 + else + dls.darwin.cpu.py2 else - if cudaSupport then - dls.linux-x86_64.cuda.py2 + if isPy35 then + if cudaSupport then + dls.linux-x86_64.cuda.py35 + else + dls.linux-x86_64.cpu.py35 + else if isPy36 then + if cudaSupport then + dls.linux-x86_64.cuda.py36 + else + dls.linux-x86_64.cpu.py36 else - dls.linux-x86_64.cpu.py2 + if cudaSupport then + dls.linux-x86_64.cuda.py2 + else + dls.linux-x86_64.cpu.py2 ); - propagatedBuildInputs = with stdenv.lib; - [ numpy six protobuf swig werkzeug mock ] - ++ optionals cudaSupport [ cudatoolkit cudnn stdenv.cc ]; + propagatedBuildInputs = + [ numpy six protobuf mock backports_weakref ] + ++ lib.optional (!isPy36) tensorflow-tensorboard + ++ lib.optionals cudaSupport [ cudatoolkit cudnn stdenv.cc ]; + + # 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. + installFlags = lib.optional isPy36 "--no-dependencies"; # Note that we need to run *after* the fixup phase because the # libraries are loaded at runtime. If we run in preFixup then |