From efa52177ff87946152ffc4852dd92892b441260c Mon Sep 17 00:00:00 2001 From: Constantine Glen Evans Date: Thu, 16 Apr 2020 12:22:10 -0700 Subject: [PATCH 1/2] tensorflow-bin_2: change tensorflow-tensorboard to _2 --- pkgs/development/python-modules/tensorflow/2/bin.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/tensorflow/2/bin.nix b/pkgs/development/python-modules/tensorflow/2/bin.nix index d32305ff513..f17a797b6c2 100644 --- a/pkgs/development/python-modules/tensorflow/2/bin.nix +++ b/pkgs/development/python-modules/tensorflow/2/bin.nix @@ -19,7 +19,7 @@ , opt-einsum , backports_weakref , tensorflow-estimator_2 -, tensorflow-tensorboard +, tensorflow-tensorboard_2 , cudaSupport ? false , cudatoolkit ? null , cudnn ? null @@ -77,7 +77,7 @@ in buildPythonPackage { google-pasta wrapt tensorflow-estimator_2 - tensorflow-tensorboard + tensorflow-tensorboard_2 keras-applications keras-preprocessing ] ++ lib.optional (!isPy3k) mock From dfbee5e5568960f3c416367ee865e9b2f9621a58 Mon Sep 17 00:00:00 2001 From: Constantine Glen Evans Date: Thu, 16 Apr 2020 12:44:06 -0700 Subject: [PATCH 2/2] tensorflow-bin_2: fix tensorboard pip-hack collision --- pkgs/development/python-modules/tensorflow/2/bin.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/development/python-modules/tensorflow/2/bin.nix b/pkgs/development/python-modules/tensorflow/2/bin.nix index f17a797b6c2..acb5f473ec9 100644 --- a/pkgs/development/python-modules/tensorflow/2/bin.nix +++ b/pkgs/development/python-modules/tensorflow/2/bin.nix @@ -159,6 +159,14 @@ in buildPythonPackage { done ''; + # Upstream has a pip hack that results in bin/tensorboard being in both tensorflow + # and the propagated input tensorflow-tensorboard, which causes environment collisions. + # Another possibility would be to have tensorboard only in the buildInputs + # See https://github.com/NixOS/nixpkgs/pull/44381 for more information. + postInstall = '' + rm $out/bin/tensorboard + ''; + pythonImportsCheck = [ "tensorflow" "tensorflow.keras"