tensorflow: cleanup and merge with libtensorflow
This merges work done by yorickvP and timokau in #63208 and #63616 respectively. Now the derivation builds both libtensorflow and the Python package and puts them into different outputs. Quite a bit of improvements were done on the top, including: * Use official tag revision as source, not a branch; * Use all system libraries possible (before only one was actually used); * Move various environment variables to the derivation itself from hooks; * Use source Python build instead of wheel build to ensure fixup hooks do their important jobs on libraries; * And more that I forgot!
This commit is contained in:
@@ -5702,14 +5702,18 @@ in {
|
||||
|
||||
tensorflow =
|
||||
if stdenv.isDarwin
|
||||
then callPackage ../development/python-modules/tensorflow/bin.nix { }
|
||||
then callPackage ../development/python-modules/tensorflow/bin.nix {
|
||||
cudaSupport = pkgs.config.cudaSupport or false;
|
||||
inherit (pkgs.linuxPackages) nvidia_x11;
|
||||
cudatoolkit = pkgs.cudatoolkit_10;
|
||||
cudnn = pkgs.cudnn_cudatoolkit_10;
|
||||
}
|
||||
else callPackage ../development/python-modules/tensorflow rec {
|
||||
cudaSupport = pkgs.config.cudaSupport or false;
|
||||
inherit (pkgs.linuxPackages) nvidia_x11;
|
||||
cudatoolkit = pkgs.cudatoolkit_10;
|
||||
cudnn = pkgs.cudnn_cudatoolkit_10;
|
||||
nccl = pkgs.nccl_cudatoolkit_10;
|
||||
protobuf_cc = pkgs.protobuf; # not the python version
|
||||
};
|
||||
|
||||
tensorflowWithoutCuda = self.tensorflow.override {
|
||||
|
||||
Reference in New Issue
Block a user