Skip to content
This repository has been archived by the owner on Oct 27, 2023. It is now read-only.

Commit

Permalink
Add support for the --ldcache argument of nvidia-container-cli
Browse files Browse the repository at this point in the history
  • Loading branch information
flx42 committed Feb 12, 2018
1 parent 0b669a3 commit 57fbead
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions config.toml.centos7
Expand Up @@ -5,5 +5,6 @@ disable-require = false
#path = "/usr/bin/nvidia-container-cli"
environment = []
#debug = "/var/log/nvidia-container-runtime-hook.log"
#ldcache = "/etc/ld.so.cache"
load-kmods = true
ldconfig = "@/sbin/ldconfig"
3 changes: 2 additions & 1 deletion config.toml.stretch
Expand Up @@ -3,7 +3,8 @@ disable-require = false

[nvidia-container-cli]
#path = "/usr/bin/nvidia-container-cli"
#debug = "/var/log/nvidia-container-runtime-hook.log"
environment = []
#debug = "/var/log/nvidia-container-runtime-hook.log"
#ldcache = "/etc/ld.so.cache"
load-kmods = true
ldconfig = "@/sbin/ldconfig"
3 changes: 2 additions & 1 deletion config.toml.xenial
Expand Up @@ -3,7 +3,8 @@ disable-require = false

[nvidia-container-cli]
#path = "/usr/bin/nvidia-container-cli"
#debug = "/var/log/nvidia-container-runtime-hook.log"
environment = []
#debug = "/var/log/nvidia-container-runtime-hook.log"
#ldcache = "/etc/ld.so.cache"
load-kmods = true
ldconfig = "@/sbin/ldconfig.real"
2 changes: 2 additions & 0 deletions nvidia-container-runtime-hook/hook_config.go
Expand Up @@ -17,6 +17,7 @@ type CLIConfig struct {
Path string `toml:"path"`
Environment []string `toml:"environment"`
Debug *string `toml:"debug"`
Ldcache *string `toml:"ldcache"`
LoadKmods bool `toml:"load-kmods"`
Ldconfig *string `toml:"ldconfig"`
}
Expand All @@ -36,6 +37,7 @@ func getDefaultHookConfig() (config HookConfig) {
Path: "",
Environment: []string{},
Debug: nil,
Ldcache: nil,
LoadKmods: true,
Ldconfig: nil,
},
Expand Down
3 changes: 3 additions & 0 deletions nvidia-container-runtime-hook/main.go
Expand Up @@ -70,6 +70,9 @@ func doPrestart() {
} else if cli.Debug != nil {
args = append(args, fmt.Sprintf("--debug=%s", *cli.Debug))
}
if cli.Ldcache != nil {
args = append(args, fmt.Sprintf("--ldcache=%s", *cli.Ldcache))
}
args = append(args, "configure")

if cli.Ldconfig != nil {
Expand Down

0 comments on commit 57fbead

Please sign in to comment.