config

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 22, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// DefaultExecutableDir specifies the default path to use for executables if they cannot be located in the path.
	DefaultExecutableDir = "/usr/bin"

	// NVIDIAContainerRuntimeHookExecutable is the executable name for the NVIDIA Container Runtime Hook
	NVIDIAContainerRuntimeHookExecutable = "xpu-container-runtime-hook"
	// NVIDIAContainerToolkitExecutable is the executable name for the NVIDIA Container Toolkit (an alias for the NVIDIA Container Runtime Hook)
	NVIDIAContainerToolkitExecutable = "xpu-container-toolkit"

	// XPUContainerRuntimeHookExecutable is the executable name for the XPU Container Runtime Hook
	XPUContainerRuntimeHookExecutable = "xpu-container-runtime-hook"
	//XPUContainerToolkitExecutable is the executable name for the XPU Container Toolkit (an alias for the XPU Container Runtime Hook)
	XPUContainerToolkitExecutable = "xpu-container-toolkit"
)

Functions

This section is empty.

Types

type CTKConfig

type CTKConfig struct {
	Path string `toml:"path"`
}

CTKConfig stores the config options for the NVIDIA Container Toolkit CLI (xpu-ctk)

type Config

type Config struct {
	NVIDIAContainerCLIConfig     ContainerCLIConfig `toml:"xpu-container-cli"`
	NVIDIACTKConfig              CTKConfig          `toml:"xpu-ctk"`
	NVIDIAContainerRuntimeConfig RuntimeConfig      `toml:"xpu-container-runtime"`
}

Config represents the contents of the config.toml file for the NVIDIA Container Toolkit Note: This is currently duplicated by the HookConfig in cmd/xpu-container-toolkit/hook_config.go

func GetConfig

func GetConfig() (*Config, error)

GetConfig sets up the config struct. Values are read from a toml file or set via the environment.

type ContainerCLIConfig

type ContainerCLIConfig struct {
	Root string
}

ContainerCLIConfig stores the options for the xpu-container-cli

type RuntimeConfig

type RuntimeConfig struct {
	DebugFilePath string `toml:"debug"`
	// LogLevel defines the logging level for the application
	LogLevel string `toml:"log-level"`
	// Runtimes defines the candidates for the low-level runtime
	Runtimes []string    `toml:"runtimes"`
	Mode     string      `toml:"mode"`
	Modes    modesConfig `toml:"modes"`
}

RuntimeConfig stores the config options for the NVIDIA Container Runtime

func GetDefaultRuntimeConfig

func GetDefaultRuntimeConfig() *RuntimeConfig

GetDefaultRuntimeConfig defines the default values for the config

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL