Add allow-cuda-compat-libs-from-container feature flag

This change adds an allow-cuda-compat-libs-from-container feature flag
to the NVIDIA Container Toolkit config. This allows a user to opt-in
to the previous default behaviour of overriding certain driver
libraries with CUDA compat libraries from the container.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
Evan Lezar
2025-01-10 10:30:39 +01:00
parent 1176430278
commit ed3b52eb8d
2 changed files with 6 additions and 2 deletions

View File

@@ -114,8 +114,9 @@ func doPrestart() {
}
args = append(args, "configure")
args = append(args, "--no-cntlibs")
if !hook.Features.AllowCUDACompatLibsFromContainer.IsEnabled() {
args = append(args, "--no-cntlibs")
}
if ldconfigPath := cli.NormalizeLDConfigPath(); ldconfigPath != "" {
args = append(args, fmt.Sprintf("--ldconfig=%s", ldconfigPath))
}