From 152d2fd22c5346fa2614825c9e03051e21bd1d72 Mon Sep 17 00:00:00 2001 From: Timo Kaufmann Date: Mon, 7 Oct 2019 10:14:16 +0200 Subject: [PATCH] python.pkgs.{tensorflow,tensorflow-estimator,tensorflow-tensorboard}: 1.14.0 -> 1.15.0 --- .../tensorflow-estimator/default.nix | 5 ++- .../tensorflow-tensorboard/default.nix | 6 +-- .../python-modules/tensorflow/default.nix | 38 +++++++++++-------- 3 files changed, 28 insertions(+), 21 deletions(-) diff --git a/pkgs/development/python-modules/tensorflow-estimator/default.nix b/pkgs/development/python-modules/tensorflow-estimator/default.nix index 127e7560679..9f6be4d1dda 100644 --- a/pkgs/development/python-modules/tensorflow-estimator/default.nix +++ b/pkgs/development/python-modules/tensorflow-estimator/default.nix @@ -6,13 +6,14 @@ buildPythonPackage rec { pname = "tensorflow-estimator"; - version = "1.14.0"; + # This is effectively 1.15.0. Upstream tagged 1.15.0 by mistake before actually updating the version in setup.py, which is why this tag is called 1.15.1. + version = "1.15.1"; format = "wheel"; src = fetchPypi { pname = "tensorflow_estimator"; inherit version format; - sha256 = "14irpsyj14vn2dpwr601f54058wywci1pv0hss8s01rl0rk3y1ya"; + sha256 = "1fc61wmc0w22frs79j2x4g6wnv5g21xc6rix1g4bsvy9qfvvylw8"; }; propagatedBuildInputs = [ mock numpy absl-py ]; diff --git a/pkgs/development/python-modules/tensorflow-tensorboard/default.nix b/pkgs/development/python-modules/tensorflow-tensorboard/default.nix index fa1759119c9..baefd635566 100644 --- a/pkgs/development/python-modules/tensorflow-tensorboard/default.nix +++ b/pkgs/development/python-modules/tensorflow-tensorboard/default.nix @@ -14,7 +14,7 @@ buildPythonPackage rec { pname = "tensorflow-tensorboard"; - version = "1.14.0"; + version = "1.15.0"; format = "wheel"; src = fetchPypi ({ @@ -23,10 +23,10 @@ buildPythonPackage rec { format = "wheel"; } // (if isPy3k then { python = "py3"; - sha256 = "1z631614jk5zgasgmwfr33gz8bwv11p9f5llzlwvx3a8rnyv3q2h"; + sha256 = "1g62i3nrgp8q9wfsyqqjkkfnsz7x2k018c26kdh527h1yrjjrbac"; } else { python = "py2"; - sha256 = "1clv29yy942l3mfar2z6wkkk6l18fz7j6mi2dfz24j9dln0scny3"; + sha256 = "0l3zc8j2sh7h1z4qpy8kfvclv3kzndri55p10i42q6xahs9phav1"; })); propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/tensorflow/default.nix b/pkgs/development/python-modules/tensorflow/default.nix index e180c9d70e9..045d610effd 100644 --- a/pkgs/development/python-modules/tensorflow/default.nix +++ b/pkgs/development/python-modules/tensorflow/default.nix @@ -5,12 +5,18 @@ # Python libraries , numpy, tensorflow-tensorboard, backports_weakref, mock, enum34, absl-py , future, setuptools, wheel, keras-preprocessing, keras-applications, google-pasta +, functools32 +, opt-einsum , termcolor, grpcio, six, wrapt, protobuf, tensorflow-estimator # Common deps , git, swig, which, binutils, glibcLocales, cython # Common libraries , jemalloc, openmpi, astor, gast, grpc, sqlite, openssl, jsoncpp, re2 , curl, snappy, flatbuffers, icu, double-conversion, libpng, libjpeg, giflib +# Upsteam by default includes cuda support since tensorflow 1.15. We could do +# that in nix as well. It would make some things easier and less confusing, but +# it would also make the default tensorflow package unfree. See +# https://groups.google.com/a/tensorflow.org/forum/#!topic/developers/iRCt5m4qUz0 , cudaSupport ? false, nvidia_x11 ? null, cudatoolkit ? null, cudnn ? null, nccl ? null # XLA without CUDA is broken , xlaSupport ? cudaSupport @@ -33,7 +39,13 @@ let cudatoolkit_joined = symlinkJoin { name = "${cudatoolkit.name}-merged"; - paths = [ cudatoolkit.out cudatoolkit.lib ]; + paths = [ + cudatoolkit.lib + cudatoolkit.out + # for some reason some of the required libs are in the targets/x86_64-linux + # directory; not sure why but this works around it + "${cudatoolkit}/targets/${stdenv.system}" + ]; }; cudatoolkit_cc_joined = symlinkJoin { @@ -55,12 +67,12 @@ let tfFeature = x: if x then "1" else "0"; - version = "1.14.0"; + version = "1.15.0"; variant = if cudaSupport then "-gpu" else ""; pname = "tensorflow${variant}"; pythonEnv = python.withPackages (_: - [ # python deps needed during wheel build time + [ # python deps needed during wheel build time (not runtime, see the buildPythonPackage part for that) numpy keras-preprocessing protobuf @@ -74,6 +86,7 @@ let wheel ] ++ lib.optionals (!isPy3k) [ future + functools32 mock ]); @@ -84,7 +97,7 @@ let owner = "tensorflow"; repo = "tensorflow"; rev = "v${version}"; - sha256 = "06jvwlsm14b8rqwd8q8796r0vmn0wk64s4ps2zg0sapkmp9vvcmi"; + sha256 = "1j8vysfblkyydrr67qr3i7kvaq5ygnjlx8hw9a9pc95ac462jq7i"; }; patches = [ @@ -99,13 +112,6 @@ let url = "https://github.com/tensorflow/tensorflow/pull/29673/commits/498e35a3bfe38dd75cf1416a1a23c07c3b59e6af.patch"; sha256 = "1m2qmwv1ysqa61z6255xggwbq6mnxbig749bdvrhnch4zydxb4di"; }) - - # https://github.com/tensorflow/tensorflow/issues/29220 - (fetchpatch { - name = "bazel-0.27.patch"; - url = "https://github.com/tensorflow/tensorflow/commit/cfccbdb8c4a92dd26382419dceb4d934c2380391.patch"; - sha256 = "1l56wjia2c4685flsfkkgy471wx3c66wyv8khspv06zchj0k0liw"; - }) ]; # On update, it can be useful to steal the changes from gentoo @@ -157,7 +163,6 @@ let # "com_github_googleapis_googleapis" # "com_github_googlecloudplatform_google_cloud_cpp" "com_google_protobuf" - "com_google_protobuf_cc" "com_googlesource_code_re2" "curl" "cython" @@ -175,11 +180,11 @@ let "lmdb" "nasm" # "nsync" # not packaged in nixpkgs + "opt_einsum_archive" "org_sqlite" "pasta" "pcre" "png_archive" - "protobuf_archive" "six_archive" "snappy" "swig" @@ -266,9 +271,9 @@ let # cudaSupport causes fetch of ncclArchive, resulting in different hashes sha256 = if cudaSupport then - "196pm3ynfafqlcxah07hkvphf536hpix1ydgsynr1yg08aynlvvx" + "1rbg8w8pjf15hpvzrclsi19lhsrwdns6f8psb1wz35ay0ggdw8c0" else - "138r85n27ijzwxfwb5pcfyb79v14368jpckw0vmciz6pwf11bd9g"; + "0j9r7xgmkc5cj53m32jk8x0qkz05bcvnwjkd9g6l6wy10anx7kvq"; }; buildAttrs = { @@ -345,9 +350,10 @@ in buildPythonPackage { termcolor wrapt grpcio + opt-einsum ] ++ lib.optionals (!isPy3k) [ mock - future # FIXME + future ] ++ lib.optionals (pythonOlder "3.4") [ backports_weakref enum34 ] ++ lib.optionals withTensorboard [