AddFlyteCustomizationsToContainer
Takes a container definition which specifies how to run a Flyte task and fills in templated command and argument values, updates resources and decorates environment variables with platform and task-specific customizations.
def AddFlyteCustomizationsToContainer(
ctx: context.Context,
parameters: template.Parameters,
mode: ResourceCustomizationMode,
container: *v1.Container,
extendedResources: *core.ExtendedResources
) - > error
Takes a container definition which specifies how to run a Flyte task and fills in templated command and argument values, updates resources and decorates environment variables with platform and task-specific customizations.
Parameters
| Name | Type | Description |
|---|---|---|
| ctx | context.Context | The context for the operation, used for logging and cancellation. |
| parameters | template.Parameters | The parameters containing task execution metadata, platform resources, and override resources used for customization. |
| mode | ResourceCustomizationMode | The mode specifying how container resources should be customized (e.g., assign, merge, or ensure in range). |
| container | *v1.Container | The container definition to which Flyte customizations will be applied, including command, arguments, environment variables, and resource requirements. |
| extendedResources | *core.ExtendedResources | Additional extended resources, such as GPU accelerators, that might influence resource sanitization. |
Returns
| Type | Description |
|---|---|
error | An error if any templating or customization fails. |