Documentation ¶
Index ¶
- func NewFakeNvidiaGPUManager(info *nvgputypes.GpusInfo, volume string, volumeDriver string) (devtypes.Device, error)
- func NewNvidiaGPUManager() (devtypes.Device, error)
- type NvidiaDockerPlugin
- type NvidiaFakePlugin
- type NvidiaGPUManager
- func (ngm *NvidiaGPUManager) Allocate(pod *types.PodInfo, container *types.ContainerInfo) ([]devtypes.Mount, []string, map[string]string, error)
- func (ngm *NvidiaGPUManager) AllocateOld(pod *types.PodInfo, container *types.ContainerInfo) ([]devtypes.Mount, []string, map[string]string, error)
- func (ngm *NvidiaGPUManager) GetName() string
- func (ngm *NvidiaGPUManager) New() error
- func (ngm *NvidiaGPUManager) Start() error
- func (ngm *NvidiaGPUManager) UpdateGPUInfo() error
- func (ngm *NvidiaGPUManager) UpdateNodeInfo(nodeInfo *types.NodeInfo) error
- type NvidiaPlugin
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFakeNvidiaGPUManager ¶
func NewNvidiaGPUManager ¶
NewNvidiaGPUManager returns a GPUManager that manages local Nvidia GPUs. TODO: Migrate to use pod level cgroups and make it generic to all runtimes.
Types ¶
type NvidiaDockerPlugin ¶
type NvidiaDockerPlugin struct { }
func (*NvidiaDockerPlugin) GetGPUCommandLine ¶
func (ndp *NvidiaDockerPlugin) GetGPUCommandLine(devices []int) ([]byte, error)
func (*NvidiaDockerPlugin) GetGPUInfo ¶
func (ndp *NvidiaDockerPlugin) GetGPUInfo() ([]byte, error)
type NvidiaFakePlugin ¶
type NvidiaFakePlugin struct {
// contains filtered or unexported fields
}
func (*NvidiaFakePlugin) GetGPUCommandLine ¶
func (np *NvidiaFakePlugin) GetGPUCommandLine(devices []int) ([]byte, error)
func (*NvidiaFakePlugin) GetGPUInfo ¶
func (np *NvidiaFakePlugin) GetGPUInfo() ([]byte, error)
type NvidiaGPUManager ¶
type NvidiaGPUManager struct { sync.Mutex GpusInfo *nvgputypes.GpusInfo // contains filtered or unexported fields }
NvidiaGPUManager manages nvidia gpu devices.
func (*NvidiaGPUManager) Allocate ¶
func (ngm *NvidiaGPUManager) Allocate(pod *types.PodInfo, container *types.ContainerInfo) ([]devtypes.Mount, []string, map[string]string, error)
For use with nvidia runtime (nvidia docker2)
func (*NvidiaGPUManager) AllocateOld ¶
func (ngm *NvidiaGPUManager) AllocateOld(pod *types.PodInfo, container *types.ContainerInfo) ([]devtypes.Mount, []string, map[string]string, error)
AllocateGPU returns MountName, MountDriver, and list of Devices to use
func (*NvidiaGPUManager) GetName ¶
func (ngm *NvidiaGPUManager) GetName() string
func (*NvidiaGPUManager) New ¶
func (ngm *NvidiaGPUManager) New() error
func (*NvidiaGPUManager) Start ¶
func (ngm *NvidiaGPUManager) Start() error
func (*NvidiaGPUManager) UpdateGPUInfo ¶
func (ngm *NvidiaGPUManager) UpdateGPUInfo() error
Initialize the GPU devices
func (*NvidiaGPUManager) UpdateNodeInfo ¶
func (ngm *NvidiaGPUManager) UpdateNodeInfo(nodeInfo *types.NodeInfo) error
Get how many GPU cards we have.
Click to show internal directories.
Click to hide internal directories.