libtorch-bin: do not depend on nvidia_x11
libcuda.so should be provided through /run/opengl-driver/lib to use the system's version. This also avoids rebuilds when linuxPackages is updated.
This commit is contained in:
parent
406c33bb3d
commit
c4482a0c2a
|
@ -8,7 +8,6 @@
|
|||
, fixDarwinDylibNames
|
||||
|
||||
, cudaSupport
|
||||
, nvidia_x11
|
||||
}:
|
||||
|
||||
let
|
||||
|
@ -24,12 +23,7 @@ in stdenv.mkDerivation {
|
|||
|
||||
nativeBuildInputs =
|
||||
if stdenv.isDarwin then [ fixDarwinDylibNames ]
|
||||
else [ addOpenGLRunpath patchelf ]
|
||||
++ lib.optionals cudaSupport [ addOpenGLRunpath ];
|
||||
|
||||
buildInputs = [
|
||||
stdenv.cc.cc
|
||||
] ++ lib.optionals cudaSupport [ nvidia_x11 ];
|
||||
else [ patchelf ] ++ lib.optionals cudaSupport [ addOpenGLRunpath ];
|
||||
|
||||
dontBuild = true;
|
||||
dontConfigure = true;
|
||||
|
@ -56,8 +50,7 @@ in stdenv.mkDerivation {
|
|||
'';
|
||||
|
||||
postFixup = let
|
||||
libPaths = [ stdenv.cc.cc.lib ]
|
||||
++ lib.optionals cudaSupport [ nvidia_x11 ];
|
||||
libPaths = [ stdenv.cc.cc.lib ];
|
||||
rpath = lib.makeLibraryPath libPaths;
|
||||
in lib.optionalString stdenv.isLinux ''
|
||||
find $out/lib -type f \( -name '*.so' -or -name '*.so.*' \) | while read lib; do
|
||||
|
|
|
@ -1671,7 +1671,6 @@ in
|
|||
else libtensorflow-bin;
|
||||
|
||||
libtorch-bin = callPackage ../development/libraries/science/math/libtorch/bin.nix {
|
||||
inherit (linuxPackages) nvidia_x11;
|
||||
cudaSupport = config.cudaSupport or false;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue