Documentation
¶
Index ¶
- Constants
- func AddDirectEnvVarsConfigMapSource(container *v1.Container, directEnvVarsMapName string)
- func AddEnvVarToContainer(container *v1.Container, envVar v1.EnvVar)
- func AddGPUSharingEnvVars(container *v1.Container, sharedGpuConfigMapName string)
- func GetConfigVolumeName(configMapName string) string
- func GetFractionContainerRef(pod *v1.Pod) (*gpusharingconfigmap.PodContainerRef, error)
- func IsSharedGPUAllocation(bindRequest *v1alpha2.BindRequest) bool
- func SetConfigMapVolume(pod *v1.Pod, configMapName string)
- func SetGPUPortion(ctx context.Context, kubeClient client.Client, pod *v1.Pod, ...) error
- func SetNvidiaVisibleDevices(ctx context.Context, kubeClient client.Client, pod *v1.Pod, ...) error
- func UpdateConfigMapEnvironmentVariable(ctx context.Context, kubeclient client.Client, task *v1.Pod, ...) error
Constants ¶
View Source
const ( GPUPortion = "GPU_PORTION" ReceivedTypeFraction = "Fraction" ReceivedTypeRegular = "Regular" )
View Source
const (
NumOfGpusEnvVarBC = "RUNAI_NUM_OF_GPUS" // Deprecated, please use GPU_PORTION env var instead
)
Variables ¶
This section is empty.
Functions ¶
func AddGPUSharingEnvVars ¶ added in v0.7.6
func GetConfigVolumeName ¶
func GetFractionContainerRef ¶ added in v0.10.0
func GetFractionContainerRef(pod *v1.Pod) (*gpusharingconfigmap.PodContainerRef, error)
func IsSharedGPUAllocation ¶
func IsSharedGPUAllocation(bindRequest *v1alpha2.BindRequest) bool
func SetConfigMapVolume ¶
func SetConfigMapVolume(pod *v1.Pod, configMapName string)
func SetGPUPortion ¶ added in v0.7.6
func SetGPUPortion( ctx context.Context, kubeClient client.Client, pod *v1.Pod, containerRef *gpusharingconfigmap.PodContainerRef, gpuPortionStr string, ) error
func SetNvidiaVisibleDevices ¶
func SetNvidiaVisibleDevices( ctx context.Context, kubeClient client.Client, pod *v1.Pod, containerRef *gpusharingconfigmap.PodContainerRef, visibleDevicesValue string, ) error
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.