mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2025-02-22 12:17:53 +00:00
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:
parent
f2b3e8d381
commit
2310ed76d8
@ -114,8 +114,9 @@ func doPrestart() {
|
|||||||
}
|
}
|
||||||
args = append(args, "configure")
|
args = append(args, "configure")
|
||||||
|
|
||||||
args = append(args, "--no-cntlibs")
|
if !hook.Features.AllowCUDACompatLibsFromContainer.IsEnabled() {
|
||||||
|
args = append(args, "--no-cntlibs")
|
||||||
|
}
|
||||||
if ldconfigPath := cli.NormalizeLDConfigPath(); ldconfigPath != "" {
|
if ldconfigPath := cli.NormalizeLDConfigPath(); ldconfigPath != "" {
|
||||||
args = append(args, fmt.Sprintf("--ldconfig=%s", ldconfigPath))
|
args = append(args, fmt.Sprintf("--ldconfig=%s", ldconfigPath))
|
||||||
}
|
}
|
||||||
|
@ -18,6 +18,9 @@ package config
|
|||||||
|
|
||||||
// features specifies a set of named features.
|
// features specifies a set of named features.
|
||||||
type features struct {
|
type features struct {
|
||||||
|
// AllowCUDACompatLibsFromContainer allows CUDA compat libs from a container
|
||||||
|
// to override certain driver library mounts from the host.
|
||||||
|
AllowCUDACompatLibsFromContainer *feature `toml:"allow-cuda-compat-libs-from-container,omitempty"`
|
||||||
// AllowLDConfigFromContainer allows non-host ldconfig paths to be used.
|
// AllowLDConfigFromContainer allows non-host ldconfig paths to be used.
|
||||||
// If this feature flag is not set to 'true' only host-rooted config paths
|
// If this feature flag is not set to 'true' only host-rooted config paths
|
||||||
// (i.e. paths starting with an '@' are considered valid)
|
// (i.e. paths starting with an '@' are considered valid)
|
||||||
|
Loading…
Reference in New Issue
Block a user