nvidia

package
v1.11.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2022 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// RuntimeName is the default name to use in configs for the NVIDIA Container Runtime
	RuntimeName = "nvidia"
	// RuntimeExecutable is the default NVIDIA Container Runtime executable file name
	RuntimeExecutable = "nvidia-container-runtime"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	SetAsDefault bool
	RuntimeName  string
	RuntimePath  string
}

Options specifies the options for the NVIDIA Container Runtime w.r.t a container engine such as docker.

func (Options) DefaultRuntime

func (o Options) DefaultRuntime() string

DefaultRuntime returns the default runtime for the configured options. If the configuration is invalid or the default runtimes should not be set the empty string is returned.

func (Options) Runtime

func (o Options) Runtime() Runtime

Runtime creates a runtime struct based on the options.

type Runtime

type Runtime struct {
	Name string
	Path string
}

Runtime defines an NVIDIA runtime with a name and a executable

func (Runtime) DockerRuntimesConfig

func (r Runtime) DockerRuntimesConfig() map[string]interface{}

DockerRuntimesConfig generatest the expected docker config for the specified runtime

Jump to

Keyboard shortcuts

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