How do you set the default image for all tasks in ...
# flyte-support
o
How do you set the default image for all tasks in a project in the
config.yml
? This is not clear at all in the docs (also not sure if it's even possible)
a
this is possible but not in the
config.yaml
as that only controls client -> control plane communication and the container image for executions is at the dataplane level. You could use
partial
to do something like this:
Copy code
image = ImageSpec(
    name="my-image",
    packages=[
        "scikit-learn",
    ],
)
task = partial(
    flytekit.task,
    container_image=image,
)
And then use the decorator as usual:
Copy code
@task
def my_function() -> None
...
but I recognize this is not tied to particular project-domain and launchplans don't accept custom image as an argument
o
No this is helpful. Will play around with the ImageSpec and see if that works. Thank you!