libtensorflow: update TensorFlow-as-library to version 2.4.0
This commit is contained in:
@@ -6,25 +6,20 @@
|
||||
|
||||
with stdenv.lib;
|
||||
let
|
||||
unavailable = throw "libtensorflow is not available for this platform!";
|
||||
broken = !stdenv.isLinux && !stdenv.isDarwin;
|
||||
|
||||
tfType = if cudaSupport then "gpu" else "cpu";
|
||||
|
||||
system =
|
||||
if stdenv.isLinux then "linux"
|
||||
else if stdenv.isDarwin then "darwin"
|
||||
else unavailable;
|
||||
system =
|
||||
if stdenv.isLinux then "linux"
|
||||
else "darwin";
|
||||
|
||||
platform =
|
||||
if stdenv.isx86_64 then "x86_64"
|
||||
else unavailable;
|
||||
platform = "x86_64";
|
||||
|
||||
rpath = makeLibraryPath ([stdenv.cc.libc stdenv.cc.cc.lib] ++
|
||||
optionals cudaSupport [ cudatoolkit.out cudatoolkit.lib cudnn nvidia_x11 ]);
|
||||
rpath = makeLibraryPath ([stdenv.cc.libc stdenv.cc.cc.lib]
|
||||
++ optionals cudaSupport [ cudatoolkit.out cudatoolkit.lib cudnn nvidia_x11 ]);
|
||||
|
||||
packages = import ./binary-hashes.nix;
|
||||
packageName = "${tfType}-${system}-${platform}";
|
||||
url = packages.${packageName} or unavailable;
|
||||
|
||||
patchLibs =
|
||||
if stdenv.isDarwin
|
||||
@@ -44,7 +39,7 @@ in stdenv.mkDerivation rec {
|
||||
pname = "libtensorflow";
|
||||
inherit (packages) version;
|
||||
|
||||
src = fetchurl url;
|
||||
src = fetchurl packages."${tfType}-${system}-${platform}";
|
||||
|
||||
nativeBuildInputs = optional cudaSupport addOpenGLRunpath;
|
||||
|
||||
@@ -72,6 +67,5 @@ in stdenv.mkDerivation rec {
|
||||
homepage = "https://www.tensorflow.org/install/lang_c";
|
||||
license = licenses.asl20;
|
||||
platforms = [ "x86_64-linux" "x86_64-darwin" ];
|
||||
maintainers = with maintainers; [ basvandijk ];
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user