mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2025-06-26 18:18:24 +00:00
Merge branch 'detect-gpus-flag' into 'master'
Detect use of --gpus flag in experimental mode See merge request nvidia/container-toolkit/container-toolkit!125
This commit is contained in:
@@ -103,7 +103,7 @@ func getDefaultConfig() *Config {
|
||||
c := Config{
|
||||
NVIDIAContainerCLIConfig: *getDefaultContainerCLIConfig(),
|
||||
NVIDIACTKConfig: *getDefaultCTKConfig(),
|
||||
NVIDIAContainerRuntimeConfig: *getDefaultRuntimeConfig(),
|
||||
NVIDIAContainerRuntimeConfig: *GetDefaultRuntimeConfig(),
|
||||
}
|
||||
|
||||
return &c
|
||||
|
||||
@@ -29,7 +29,7 @@ type RuntimeConfig struct {
|
||||
|
||||
// getRuntimeConfigFrom reads the nvidia container runtime config from the specified toml Tree.
|
||||
func getRuntimeConfigFrom(toml *toml.Tree) *RuntimeConfig {
|
||||
cfg := getDefaultRuntimeConfig()
|
||||
cfg := GetDefaultRuntimeConfig()
|
||||
|
||||
if toml == nil {
|
||||
return cfg
|
||||
@@ -42,8 +42,8 @@ func getRuntimeConfigFrom(toml *toml.Tree) *RuntimeConfig {
|
||||
return cfg
|
||||
}
|
||||
|
||||
// getDefaultRuntimeConfig defines the default values for the config
|
||||
func getDefaultRuntimeConfig() *RuntimeConfig {
|
||||
// GetDefaultRuntimeConfig defines the default values for the config
|
||||
func GetDefaultRuntimeConfig() *RuntimeConfig {
|
||||
c := RuntimeConfig{
|
||||
DebugFilePath: "/dev/null",
|
||||
Experimental: false,
|
||||
|
||||
@@ -59,7 +59,7 @@ func (d legacy) Hooks() ([]Hook, error) {
|
||||
}
|
||||
d.logger.Debugf("Using NVIDIA Container Runtime Hook path %v", hookPath)
|
||||
|
||||
args := []string{hookPath, "prestart"}
|
||||
args := []string{hookPath, "--force", "prestart"}
|
||||
h := Hook{
|
||||
Lifecycle: cdi.PrestartHook,
|
||||
Path: hookPath,
|
||||
|
||||
Reference in New Issue
Block a user