I wondered if there is a way to define the docker ...
# flyte-support
a
I wondered if there is a way to define the docker image of as task as an parameter in a workflow. Or even better to define the pod_template (we also have a sidecar container that we want to specify) of a task on workflow level. Background is that we want to say: please use this version of the docker image (which has the software version that we want to test) in this specific run. Next run we want to execute another docker image (version of our software). What I tried is this, but this seems not to work:
Copy code
@workflow
def override_wf(image: str = "default-image") -> str:
    out1 = step1()
    # Seems not to work :(
    out2 = step2(var=out1).with_overrides(container_image=image)
a
Just curious, how are you checking whether it works?
The reason I ask is because we thought we had a similar issue w/ resource requests but we were checking the UI only, which has a bug - https://github.com/flyteorg/flyte/issues/5589
m
I have the same issue. It is not working because image in
step2(var=out1).with_overrides(container_image=image)
is in type of promise, but
contrainer_image
wants a string.
@alert-grass-20163 do you find a way to make it work?
a
Thanks for asking! I wanted to try out dynamic workflows somewhen next week, this may help. I keep you posted.
m
@alert-grass-20163 This solution works well for me. See if you want to give it a try.