tensorflow: expose binary builds

This commit is contained in:
Nikolay Amiantov 2019-07-31 13:33:26 +03:00
parent 19cdfe87f9
commit cd0e461f93
2 changed files with 24 additions and 21 deletions

@ -1093,16 +1093,18 @@ in
tensor = libsForQt5.callPackage ../applications/networking/instant-messengers/tensor { }; tensor = libsForQt5.callPackage ../applications/networking/instant-messengers/tensor { };
libtensorflow = libtensorflow-bin = callPackage ../development/libraries/science/math/tensorflow/bin.nix {
if python.pkgs.tensorflow ? libtensorflow
then python.pkgs.tensorflow.libtensorflow
else callPackage ../development/libraries/science/math/tensorflow/bin.nix {
cudaSupport = pkgs.config.cudaSupport or false; cudaSupport = pkgs.config.cudaSupport or false;
inherit (linuxPackages) nvidia_x11; inherit (linuxPackages) nvidia_x11;
cudatoolkit = cudatoolkit_10_0; cudatoolkit = cudatoolkit_10_0;
cudnn = cudnn_cudatoolkit_10_0; cudnn = cudnn_cudatoolkit_10_0;
}; };
libtensorflow =
if python.pkgs.tensorflow ? libtensorflow
then python.pkgs.tensorflow.libtensorflow
else libtensorflow-bin;
behdad-fonts = callPackage ../data/fonts/behdad-fonts { }; behdad-fonts = callPackage ../data/fonts/behdad-fonts { };
blink1-tool = callPackage ../tools/misc/blink1-tool { }; blink1-tool = callPackage ../tools/misc/blink1-tool { };

@ -5700,15 +5700,14 @@ in {
tensorflow-tensorboard = callPackage ../development/python-modules/tensorflow-tensorboard { }; tensorflow-tensorboard = callPackage ../development/python-modules/tensorflow-tensorboard { };
tensorflow = tensorflow-bin = callPackage ../development/python-modules/tensorflow/bin.nix {
if stdenv.isDarwin
then callPackage ../development/python-modules/tensorflow/bin.nix {
cudaSupport = pkgs.config.cudaSupport or false; cudaSupport = pkgs.config.cudaSupport or false;
inherit (pkgs.linuxPackages) nvidia_x11; inherit (pkgs.linuxPackages) nvidia_x11;
cudatoolkit = pkgs.cudatoolkit_10; cudatoolkit = pkgs.cudatoolkit_10;
cudnn = pkgs.cudnn_cudatoolkit_10; cudnn = pkgs.cudnn_cudatoolkit_10;
} };
else callPackage ../development/python-modules/tensorflow rec {
tensorflow-build = callPackage ../development/python-modules/tensorflow {
cudaSupport = pkgs.config.cudaSupport or false; cudaSupport = pkgs.config.cudaSupport or false;
inherit (pkgs.linuxPackages) nvidia_x11; inherit (pkgs.linuxPackages) nvidia_x11;
cudatoolkit = pkgs.cudatoolkit_10; cudatoolkit = pkgs.cudatoolkit_10;
@ -5716,6 +5715,8 @@ in {
nccl = pkgs.nccl_cudatoolkit_10; nccl = pkgs.nccl_cudatoolkit_10;
}; };
tensorflow = if stdenv.isDarwin then self.tensorflow-bin else self.tensorflow-build;
tensorflowWithoutCuda = self.tensorflow.override { tensorflowWithoutCuda = self.tensorflow.override {
cudaSupport = false; cudaSupport = false;
}; };