diff options
author | Phillip Cloud <cloud@standard.ai> | 2021-01-09 09:34:24 -0500 |
---|---|---|
committer | Phillip Cloud <cloud@standard.ai> | 2021-01-10 08:54:37 -0500 |
commit | b578c282172626ffc848d12622cdc81ab5aaa89e (patch) | |
tree | f1244713cb44ac14b4bb00833efcfbb33d196582 /pkgs | |
parent | f3c1e795bb05bbbd05eefbf4e9c21a741785d8d7 (diff) |
nvidia-docker: split out libnvidia-container into separate drv
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/applications/virtualization/libnvidia-container/avoid-static-libtirpc-build.patch (renamed from pkgs/applications/virtualization/nvidia-docker/avoid-static-libtirpc-build.patch) | 0 | ||||
-rw-r--r-- | pkgs/applications/virtualization/libnvidia-container/default.nix (renamed from pkgs/applications/virtualization/nvidia-docker/libnvc.nix) | 12 | ||||
-rw-r--r-- | pkgs/applications/virtualization/libnvidia-container/libnvc-ldconfig-and-path-fixes.patch (renamed from pkgs/applications/virtualization/nvidia-docker/libnvc-ldconfig-and-path-fixes.patch) | 0 | ||||
-rw-r--r-- | pkgs/applications/virtualization/libnvidia-container/modprobe.patch (renamed from pkgs/applications/virtualization/nvidia-docker/modprobe.patch) | 0 | ||||
-rw-r--r-- | pkgs/applications/virtualization/nvidia-docker/default.nix | 5 |
5 files changed, 10 insertions, 7 deletions
diff --git a/pkgs/applications/virtualization/nvidia-docker/avoid-static-libtirpc-build.patch b/pkgs/applications/virtualization/libnvidia-container/avoid-static-libtirpc-build.patch index d3f207de00b29..d3f207de00b29 100644 --- a/pkgs/applications/virtualization/nvidia-docker/avoid-static-libtirpc-build.patch +++ b/pkgs/applications/virtualization/libnvidia-container/avoid-static-libtirpc-build.patch diff --git a/pkgs/applications/virtualization/nvidia-docker/libnvc.nix b/pkgs/applications/virtualization/libnvidia-container/default.nix index 95d66582618e9..f57863cba11c6 100644 --- a/pkgs/applications/virtualization/nvidia-docker/libnvc.nix +++ b/pkgs/applications/virtualization/libnvidia-container/default.nix @@ -7,6 +7,8 @@ , libseccomp , rpcsvc-proto , libtirpc +, makeWrapper + }: let modp-ver = "450.57"; @@ -23,7 +25,7 @@ stdenv.mkDerivation rec { src = fetchFromGitHub { owner = "NVIDIA"; - repo = "libnvidia-container"; + repo = pname; rev = "v${version}"; sha256 = "0j6b8z9x9hrrs4xp11zyjjd7kyl7fzcicpiis8k1qb1q2afnqsrq"; }; @@ -64,10 +66,15 @@ stdenv.mkDerivation rec { popd ''; + postInstall = '' + wrapProgram $out/bin/nvidia-container-cli \ + --prefix LD_LIBRARY_PATH : /run/opengl-driver/lib:/run/opengl-driver-32/lib + ''; + NIX_CFLAGS_COMPILE = [ "-I${libtirpc.dev}/include/tirpc" ]; NIX_LDFLAGS = [ "-L${libtirpc.dev}/lib" "-ltirpc" ]; - nativeBuildInputs = [ pkgconfig rpcsvc-proto ]; + nativeBuildInputs = [ pkgconfig rpcsvc-proto makeWrapper ]; buildInputs = [ libelf libcap libseccomp libtirpc ]; @@ -76,5 +83,6 @@ stdenv.mkDerivation rec { description = "NVIDIA container runtime library"; license = licenses.bsd3; platforms = platforms.linux; + maintainers = with maintainers; [ cpcloud ]; }; } diff --git a/pkgs/applications/virtualization/nvidia-docker/libnvc-ldconfig-and-path-fixes.patch b/pkgs/applications/virtualization/libnvidia-container/libnvc-ldconfig-and-path-fixes.patch index d4638791a01cb..d4638791a01cb 100644 --- a/pkgs/applications/virtualization/nvidia-docker/libnvc-ldconfig-and-path-fixes.patch +++ b/pkgs/applications/virtualization/libnvidia-container/libnvc-ldconfig-and-path-fixes.patch diff --git a/pkgs/applications/virtualization/nvidia-docker/modprobe.patch b/pkgs/applications/virtualization/libnvidia-container/modprobe.patch index 8e7b0a723ec0c..8e7b0a723ec0c 100644 --- a/pkgs/applications/virtualization/nvidia-docker/modprobe.patch +++ b/pkgs/applications/virtualization/libnvidia-container/modprobe.patch diff --git a/pkgs/applications/virtualization/nvidia-docker/default.nix b/pkgs/applications/virtualization/nvidia-docker/default.nix index 0df2efebd8202..ac2b9db0c5cd9 100644 --- a/pkgs/applications/virtualization/nvidia-docker/default.nix +++ b/pkgs/applications/virtualization/nvidia-docker/default.nix @@ -13,7 +13,6 @@ }: with lib; let - libnvidia-container = callPackage ./libnvc.nix { }; isolatedContainerRuntimePath = linkFarm "isolated_container_runtime_path" [ { name = "runc"; @@ -74,7 +73,6 @@ stdenv.mkDerivation rec { cp nvidia-docker bin substituteInPlace bin/nvidia-docker --subst-var-by VERSION ${version} - cp ${libnvidia-container}/bin/nvidia-container-cli bin cp ${nvidia-container-toolkit}/bin/nvidia-container-{toolkit,runtime-hook} bin cp ${nvidia-container-runtime}/bin/nvidia-container-runtime bin ''; @@ -83,9 +81,6 @@ stdenv.mkDerivation rec { mkdir -p $out/{bin,etc} cp -r bin $out - wrapProgram $out/bin/nvidia-container-cli \ - --prefix LD_LIBRARY_PATH : /run/opengl-driver/lib:/run/opengl-driver-32/lib - # nvidia-container-runtime invokes docker-runc or runc if that isn't available on PATH wrapProgram $out/bin/nvidia-container-runtime --prefix PATH : ${isolatedContainerRuntimePath} |