Commit Graph

4 Commits

Author SHA1 Message Date
Evan Lezar
715e09fbd4
Move CreateLdsoconfdFile to ContainerRoot
Since the creation of a .conf file in /etc/ld.so.conf.d is shared by
both the update-ldcache and enable-cuda-compat hooks, this is moved
to the ContainerRoot type.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
2025-03-20 13:21:52 +02:00
Evan Lezar
5d2f48cd42
Use oci.ContainerRoot from enable-cuda-compat
This change updates the enable-cuda-compat implementation to also use
oci.ContainerRoot.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
2025-03-20 13:21:52 +02:00
Evan Lezar
13bbf71ead
Move ContainerRoot type to oci package
Thsi change moves the ContainerRoot type to the oci package and updates
state.GetContainerRootDirPath to return a variable of type ContainerRoot. This
enabled better reuse between hooks.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
2025-03-20 13:21:51 +02:00
Evan Lezar
fc65d3a784
Add enable-cuda-compat hook to allow compat libs to be discovered
This change adds an nvidia-cdi-hook enable-cuda-compat hook that checks the
container for cuda compat libs and updates /etc/ld.so.conf.d to include their
parent folder if their driver major version is sufficient.

This allows CUDA Forward Compatibility to be used when this is not available
through the libnvidia-container.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
2025-02-27 15:58:15 +02:00