Skip to content

Commit

Permalink
Merge commit from fork
Browse files Browse the repository at this point in the history
 Disable mounting of compat libs from container by default
  • Loading branch information
elezar authored Jan 23, 2025
2 parents c22f3bd + 6b23674 commit 7ae5c29
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions cmd/nvidia-container-runtime-hook/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ func doPrestart() {
}
args = append(args, "configure")

if !hook.Features.AllowCUDACompatLibsFromContainer.IsEnabled() {
args = append(args, "--no-cntlibs")
}
if ldconfigPath := cli.NormalizeLDConfigPath(); ldconfigPath != "" {
args = append(args, fmt.Sprintf("--ldconfig=%s", ldconfigPath))
}
Expand Down
3 changes: 3 additions & 0 deletions internal/config/features.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ package config

// features specifies a set of named features.
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.
// If this feature flag is not set to 'true' only host-rooted config paths
// (i.e. paths starting with an '@' are considered valid)
Expand Down
2 changes: 1 addition & 1 deletion third_party/libnvidia-container

0 comments on commit 7ae5c29

Please sign in to comment.