Hi <@U06RKAMK0UC> How to replace my own image in p...
# ask-ai
a
Hi @ancient-wolf-19325 How to replace my own image in pod spec config of task, dynamically while triggering workflow
j
You can dynamically override the container image for a Flyte task at workflow execution time using the
.with_overrides(container_image=...)
method. This allows you to specify a different image than the one set in the task decorator when triggering the workflow. For example:
Copy code
@task(container_image="my-default-image")
def my_task():
    ...

@workflow
def wf():
    my_task().with_overrides(container_image="my-custom-image:latest")
This feature is supported in Flytekit β‰₯1.15.0. Note that for some task types (e.g., map_task or certain plugins), there may be limitations or bugs, so always verify with your Flyte version and backend configuration. See the Flyte 1.15.0 release notes and related issue discussion for details. Would you like a step-by-step example or troubleshooting tips for specific scenarios? Sources: - Flyte 1.15.0 release notes - Task node overrides issue πŸ‘ 0 button πŸ‘Ž 0 button πŸ’‘ Hint: Mention @runllm in the thread for followups.
a
hey I am using 1.13 @ancient-wolf-19325
j
In Flyte 1.13, dynamic container image overrides using
.with_overrides(container_image=...)
are not fully supported at runtime. The override may only work at registration time, and only the last override is honored if used multiple times. For full support of dynamic image overrides at workflow execution, you need to upgrade to Flyte 1.15 or later. See issue #4543 and release notes. Would you like more detail on possible workarounds or how to upgrade? Sources: - Task node overrides issue - Flyte 1.15.0 release notes πŸ‘ 0 button πŸ‘Ž 0 button πŸ’‘ Hint: Mention @runllm in the thread for followups.
a
i am using pod spec not pd template and also version is 1.14.5 @ancient-wolf-19325
j
In Flyte 1.14.5, if you define your task using a pod spec (e.g., via the
Pod
task config), you cannot dynamically override the container image at workflow execution time using
.with_overrides(container_image=...)
. This override is only fully supported for standard tasks and pod templates starting in Flyte 1.15.0. In 1.14.5, the image set in the pod spec at registration is what will be used at runtimeβ€”dynamic replacement is not supported for pod spec-based tasks. See issue #4543 and 1.15.0 release notes. Would you like guidance on upgrading or alternative approaches for your use case? Sources: - Task node overrides issue - 1.15.0 release notes πŸ‘ 0 button πŸ‘Ž 0 button πŸ’‘ Hint: Mention @runllm in the thread for followups.
a
I think there is option placer or somethin in pod template it self to provide image while running workflow @ancient-wolf-19325
j
There is no documented option in Flyte 1.14.5 PodSpec or PodTemplate to dynamically set the image at workflow execution time using a placeholder or similar mechanism. The image field in the pod spec or pod template is static and must be set at registration; Flyte does not support runtime templating for the image field in pod specs or pod templates in this version. See PodTemplate documentation and issue #4543. Would you like more detail on how image resolution works or on supported dynamic options in newer versions? Sources: - Task node overrides issue - PodTemplate documentation πŸ‘ 0 button πŸ‘Ž 0 button πŸ’‘ Hint: Mention @runllm in the thread for followups.
a
there is option to image placer like imagename something in flyte task config @ancient-wolf-19325
j
There is no documented or supported option in Flyte 1.14.5 to use a placeholder like
__imagename__
or similar in the pod spec or task config to dynamically set the image at workflow execution time. The image must be explicitly set at registration, and Flyte does not interpolate or replace such placeholders at runtime in this version. This feature is not mentioned in the official PodTemplate documentation or related issues. Would you like more detail on how Flyte handles image resolution or on dynamic image options in newer versions? Sources: - Task node overrides issue πŸ‘ 0 button πŸ‘Ž 0 button πŸ’‘ Hint: Mention @runllm in the thread for followups.
a
@acoustic-parrot-22802 so you need to override the podtemplate or the image at Runtime?
a
yes, @average-finland-92144 image at run time and also if you clarify is it possible to override volume field in podtemplate also better. I know it is possible in pod spec. we are using 1.14.5 version.