nixos/virtualisation.containers.cdi.dynamic.nvidia: expose driverLink

..shallowly
This commit is contained in:
Someone Serge 2024-02-27 12:50:59 +00:00
parent 65dbac7215
commit 2a63db4e6f
No known key found for this signature in database
GPG key ID: 7B0E3B1390D61DA4

View file

@ -1,4 +1,5 @@
{
addDriverRunpath,
glibc,
jq,
lib,
@ -10,6 +11,7 @@
let
mountOptions = { options = ["ro" "nosuid" "nodev" "bind"]; };
mounts = [
# FIXME: Making /usr mounts optional
{ hostPath = lib.getExe' nvidia-driver "nvidia-cuda-mps-control";
containerPath = "/usr/bin/nvidia-cuda-mps-control"; }
{ hostPath = lib.getExe' nvidia-driver "nvidia-cuda-mps-server";
@ -24,6 +26,14 @@ let
containerPath = "/usr/bin/nvidia-ctk"; }
{ hostPath = "${lib.getLib glibc}/lib";
containerPath = "${lib.getLib glibc}/lib"; }
# FIXME: use closureinfo
{
hostPath = addDriverRunpath.driverLink;
containerPath = addDriverRunpath.driverLink;
}
{ hostPath = "${lib.getLib glibc}/lib";
containerPath = "${lib.getLib glibc}/lib"; }
{ hostPath = "${lib.getLib glibc}/lib64";
containerPath = "${lib.getLib glibc}/lib64"; }
];