python.pkgs.{tensorflow,tensorflow-estimator,tensorflow-tensorboard}: 1.14.0 -> 1.15.0

This commit is contained in:
Timo Kaufmann 2019-10-07 10:14:16 +02:00
parent 1395327b4e
commit 152d2fd22c
3 changed files with 28 additions and 21 deletions

View file

@ -6,13 +6,14 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "tensorflow-estimator"; 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"; format = "wheel";
src = fetchPypi { src = fetchPypi {
pname = "tensorflow_estimator"; pname = "tensorflow_estimator";
inherit version format; inherit version format;
sha256 = "14irpsyj14vn2dpwr601f54058wywci1pv0hss8s01rl0rk3y1ya"; sha256 = "1fc61wmc0w22frs79j2x4g6wnv5g21xc6rix1g4bsvy9qfvvylw8";
}; };
propagatedBuildInputs = [ mock numpy absl-py ]; propagatedBuildInputs = [ mock numpy absl-py ];

View file

@ -14,7 +14,7 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "tensorflow-tensorboard"; pname = "tensorflow-tensorboard";
version = "1.14.0"; version = "1.15.0";
format = "wheel"; format = "wheel";
src = fetchPypi ({ src = fetchPypi ({
@ -23,10 +23,10 @@ buildPythonPackage rec {
format = "wheel"; format = "wheel";
} // (if isPy3k then { } // (if isPy3k then {
python = "py3"; python = "py3";
sha256 = "1z631614jk5zgasgmwfr33gz8bwv11p9f5llzlwvx3a8rnyv3q2h"; sha256 = "1g62i3nrgp8q9wfsyqqjkkfnsz7x2k018c26kdh527h1yrjjrbac";
} else { } else {
python = "py2"; python = "py2";
sha256 = "1clv29yy942l3mfar2z6wkkk6l18fz7j6mi2dfz24j9dln0scny3"; sha256 = "0l3zc8j2sh7h1z4qpy8kfvclv3kzndri55p10i42q6xahs9phav1";
})); }));
propagatedBuildInputs = [ propagatedBuildInputs = [

View file

@ -5,12 +5,18 @@
# Python libraries # Python libraries
, numpy, tensorflow-tensorboard, backports_weakref, mock, enum34, absl-py , numpy, tensorflow-tensorboard, backports_weakref, mock, enum34, absl-py
, future, setuptools, wheel, keras-preprocessing, keras-applications, google-pasta , future, setuptools, wheel, keras-preprocessing, keras-applications, google-pasta
, functools32
, opt-einsum
, termcolor, grpcio, six, wrapt, protobuf, tensorflow-estimator , termcolor, grpcio, six, wrapt, protobuf, tensorflow-estimator
# Common deps # Common deps
, git, swig, which, binutils, glibcLocales, cython , git, swig, which, binutils, glibcLocales, cython
# Common libraries # Common libraries
, jemalloc, openmpi, astor, gast, grpc, sqlite, openssl, jsoncpp, re2 , jemalloc, openmpi, astor, gast, grpc, sqlite, openssl, jsoncpp, re2
, curl, snappy, flatbuffers, icu, double-conversion, libpng, libjpeg, giflib , 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 , cudaSupport ? false, nvidia_x11 ? null, cudatoolkit ? null, cudnn ? null, nccl ? null
# XLA without CUDA is broken # XLA without CUDA is broken
, xlaSupport ? cudaSupport , xlaSupport ? cudaSupport
@ -33,7 +39,13 @@ let
cudatoolkit_joined = symlinkJoin { cudatoolkit_joined = symlinkJoin {
name = "${cudatoolkit.name}-merged"; 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 { cudatoolkit_cc_joined = symlinkJoin {
@ -55,12 +67,12 @@ let
tfFeature = x: if x then "1" else "0"; tfFeature = x: if x then "1" else "0";
version = "1.14.0"; version = "1.15.0";
variant = if cudaSupport then "-gpu" else ""; variant = if cudaSupport then "-gpu" else "";
pname = "tensorflow${variant}"; pname = "tensorflow${variant}";
pythonEnv = python.withPackages (_: 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 numpy
keras-preprocessing keras-preprocessing
protobuf protobuf
@ -74,6 +86,7 @@ let
wheel wheel
] ++ lib.optionals (!isPy3k) ] ++ lib.optionals (!isPy3k)
[ future [ future
functools32
mock mock
]); ]);
@ -84,7 +97,7 @@ let
owner = "tensorflow"; owner = "tensorflow";
repo = "tensorflow"; repo = "tensorflow";
rev = "v${version}"; rev = "v${version}";
sha256 = "06jvwlsm14b8rqwd8q8796r0vmn0wk64s4ps2zg0sapkmp9vvcmi"; sha256 = "1j8vysfblkyydrr67qr3i7kvaq5ygnjlx8hw9a9pc95ac462jq7i";
}; };
patches = [ patches = [
@ -99,13 +112,6 @@ let
url = "https://github.com/tensorflow/tensorflow/pull/29673/commits/498e35a3bfe38dd75cf1416a1a23c07c3b59e6af.patch"; url = "https://github.com/tensorflow/tensorflow/pull/29673/commits/498e35a3bfe38dd75cf1416a1a23c07c3b59e6af.patch";
sha256 = "1m2qmwv1ysqa61z6255xggwbq6mnxbig749bdvrhnch4zydxb4di"; 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 # On update, it can be useful to steal the changes from gentoo
@ -157,7 +163,6 @@ let
# "com_github_googleapis_googleapis" # "com_github_googleapis_googleapis"
# "com_github_googlecloudplatform_google_cloud_cpp" # "com_github_googlecloudplatform_google_cloud_cpp"
"com_google_protobuf" "com_google_protobuf"
"com_google_protobuf_cc"
"com_googlesource_code_re2" "com_googlesource_code_re2"
"curl" "curl"
"cython" "cython"
@ -175,11 +180,11 @@ let
"lmdb" "lmdb"
"nasm" "nasm"
# "nsync" # not packaged in nixpkgs # "nsync" # not packaged in nixpkgs
"opt_einsum_archive"
"org_sqlite" "org_sqlite"
"pasta" "pasta"
"pcre" "pcre"
"png_archive" "png_archive"
"protobuf_archive"
"six_archive" "six_archive"
"snappy" "snappy"
"swig" "swig"
@ -266,9 +271,9 @@ let
# cudaSupport causes fetch of ncclArchive, resulting in different hashes # cudaSupport causes fetch of ncclArchive, resulting in different hashes
sha256 = if cudaSupport then sha256 = if cudaSupport then
"196pm3ynfafqlcxah07hkvphf536hpix1ydgsynr1yg08aynlvvx" "1rbg8w8pjf15hpvzrclsi19lhsrwdns6f8psb1wz35ay0ggdw8c0"
else else
"138r85n27ijzwxfwb5pcfyb79v14368jpckw0vmciz6pwf11bd9g"; "0j9r7xgmkc5cj53m32jk8x0qkz05bcvnwjkd9g6l6wy10anx7kvq";
}; };
buildAttrs = { buildAttrs = {
@ -345,9 +350,10 @@ in buildPythonPackage {
termcolor termcolor
wrapt wrapt
grpcio grpcio
opt-einsum
] ++ lib.optionals (!isPy3k) [ ] ++ lib.optionals (!isPy3k) [
mock mock
future # FIXME future
] ++ lib.optionals (pythonOlder "3.4") [ ] ++ lib.optionals (pythonOlder "3.4") [
backports_weakref enum34 backports_weakref enum34
] ++ lib.optionals withTensorboard [ ] ++ lib.optionals withTensorboard [