oci

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Default path for AMD Container Runtime OCI hook
	DEFAULT_HOOK_PATH = "/usr/bin/amd-container-runtime-hook"
)

Constants

Variables

This section is empty.

Functions

This section is empty.

Types

type GetGPU

type GetGPU func(string) (amdgpu.AMDGPU, error)

GetGPU is the type for functions that return the device information for the given GPU

type GetGPUs

type GetGPUs func() ([]amdgpu.DeviceInfo, error)

GetGPUs is the type for functions that return the lists of all the GPU devices on the system

type GetUniqueIdToDeviceIndexMap added in v1.2.0

type GetUniqueIdToDeviceIndexMap func() (map[string][]int, error)

GetUniqueIdToDeviceIndexMap is the type for functions that return UUID to device index mapping

type Interface

type Interface interface {
	// HasHelpOption returns true if the passed arguments include the help option
	HasHelpOption() bool

	// IsCreate returns true if the container is getting created now
	IsCreate() bool

	// UpdateSpec updates the input OCI spec as per the request op
	UpdateSpec(op SpecUpdateOp) error

	// WriteSpec writes the updated spec back to disk
	WriteSpec() error

	// PrintSpec prints the current spec on the console
	PrintSpec() error
}

Interface for OCI package

func New

func New(argv []string) (Interface, error)

New creates an OCI instance

type ReserveGPUs added in v1.2.0

type ReserveGPUs func(string, string) ([]int, error)

ReserveGPUs is the type for functions that return a list of reserved GPUs

type SpecUpdateOp

type SpecUpdateOp int

SpecUpdateOp specifies type of update operation on the OCI spec

const (
	AddHook SpecUpdateOp = iota
	AddGPUDevices
)

Enumeration of the update operations on the OCI spec

Jump to

Keyboard shortcuts

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