From ebf348fc9a7f2ebe9fbf20ec675b9a6613381c6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20de=20Kok?= Date: Mon, 15 Feb 2021 19:29:35 +0100 Subject: [PATCH] python3Packages.pytorch-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. --- pkgs/development/python-modules/pytorch/bin.nix | 3 +-- pkgs/top-level/python-packages.nix | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/pytorch/bin.nix b/pkgs/development/python-modules/pytorch/bin.nix index 1ffda5c86b0e..0571269fa8b2 100644 --- a/pkgs/development/python-modules/pytorch/bin.nix +++ b/pkgs/development/python-modules/pytorch/bin.nix @@ -5,7 +5,6 @@ , isPy38 , isPy39 , python -, nvidia_x11 , addOpenGLRunpath , future , numpy @@ -52,7 +51,7 @@ in buildPythonPackage { ''; postFixup = let - rpath = lib.makeLibraryPath [ stdenv.cc.cc.lib nvidia_x11 ]; + rpath = lib.makeLibraryPath [ stdenv.cc.cc.lib ]; in '' find $out/${python.sitePackages}/torch/lib -type f \( -name '*.so' -or -name '*.so.*' \) | while read lib; do echo "setting rpath for $lib..." diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 276dc923acc6..bdbd920387f7 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6497,9 +6497,7 @@ in { pytorch = callPackage ../development/python-modules/pytorch { cudaSupport = pkgs.config.cudaSupport or false; }; - pytorch-bin = callPackage ../development/python-modules/pytorch/bin.nix { - inherit (pkgs.linuxPackages) nvidia_x11; - }; + pytorch-bin = callPackage ../development/python-modules/pytorch/bin.nix { }; pytorch-lightning = callPackage ../development/python-modules/pytorch-lightning { };