https://flyte.org logo
Title
l

Laura Lin

05/09/2023, 3:55 AM
what's the recommended way to do a docker container override. e.g. if I have a map_task that I want to run but change the docker container depending on the inputs to the dynamic workflow? I saw this thread https://flyte-org.slack.com/archives/CP2HDHKE1/p1680165557703209 but ideally, I don't want to create a new task for each potential image
k

Kevin Su

05/09/2023, 7:01 AM
if we support
.with_override(container_image=…)
, will it address your issue?
l

Laura Lin

05/09/2023, 3:00 PM
yep! I believe so. in the meantime, is doing it the way Dan suggested the way to go?
k

Kevin Su

05/09/2023, 3:40 PM
yes, use conditional task avoid compile DAG at runtime.
l

Laura Lin

05/09/2023, 3:45 PM
if I'm trying to call this inside of a dynamic workflow, is there a point to using conditional? or best practices is to restructure so that I am using conditionals inside workflow instead of dynamic
k

Kevin Su

05/09/2023, 3:53 PM
best practices is to restructure so that I am using conditionals inside workflow instead of dynamic
right. use dynamic if you have more complex logic (like for loop). otherwise, it’s better to use static workflow.