mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Pass ldconfig.real instead of ldconfig to nvidia-container-cli when available.
Compare nvidia-container-toolkit:internal/config/config.go:getLdConfigPath(). Updates #9083 PiperOrigin-RevId: 540009997
This commit is contained in:
@@ -1702,9 +1702,12 @@ func nvproxyUpdateAppRootFilesystem(spec *specs.Spec, conf *config.Config) error
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to locate nvidia-container-cli in PATH: %w", err)
|
||||
}
|
||||
ldconfigPath, err := exec.LookPath("ldconfig")
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to locate ldconfig in PATH: %w", err)
|
||||
// On Ubuntu, ldconfig is a wrapper around ldconfig.real, and we need the latter.
|
||||
var ldconfigPath string
|
||||
if _, err := os.Stat("/sbin/ldconfig.real"); err == nil {
|
||||
ldconfigPath = "/sbin/ldconfig.real"
|
||||
} else {
|
||||
ldconfigPath = "/sbin/ldconfig"
|
||||
}
|
||||
|
||||
// nvidia-container-cli does not create this directory.
|
||||
|
||||
Reference in New Issue
Block a user