https://flyte.org logo
#ask-the-community
Title
# ask-the-community
a

Aleksei Potov

03/02/2023, 10:19 PM
hello, Flyte newbie here: I'm trying to use
ContainerTask
where name of the image is a parameter into my workflow. Naive approach does not work as parameter is a promise that is unresolved at task declaration time:
Copy code
@workflow
def run_test(version: str) -> str:
    run_container_task = ContainerTask(
        ...
        image="repository/test:{version???}",
        command=[
            "uname",
        ],
    )

    return run_container_task(version='v1')
Thanks!
k

Ketan (kumare3)

03/02/2023, 10:36 PM
you can use
@dynamic
workflows to generate these container tasks
workflows are static DSL's and are interpreted at compile time
a

Aleksei Potov

03/03/2023, 12:23 AM
that worked, thanks!