Abdullah Mobeen
08/30/2023, 5:16 PMflytekit
?
We have a base image for our workflow that's in a GCR project. We have another image in a different GCR project that we want to use for one task that requires additional dependencies. What's the best way to achieve this?Yicheng Lu
08/30/2023, 5:37 PMAbdullah Mobeen
08/30/2023, 5:38 PM"{{.image.mindmeld.fqn}}:{{.image.mindmeld.version}}"
Yicheng Lu
08/30/2023, 5:39 PMfrom typing import List, Dict, Any, Annotated
from flytekit import task, Resources, workflow
@task(
limits=Resources(mem="4Gi",cpu="1"),
disable_deck=True,
container_image="{{.image.oldImage}}",
cache=True, cache_version="1.0"
)
def task0() -> List[List[Any]]:
return [ ["foo","foo","foo"] ] * 2
@task(
limits=Resources(mem="4Gi",cpu="1"),
disable_deck=True,
container_image="{{.image.prImage}}",
)
def task1(data: List[List[Any]]) -> List[List[Any]]:
print(data)
return data
@workflow
def wf():
data = task0()
task1(data=data)
# pyflyte run --image prImage="yichenglu/flytekit:mytest4" --image oldImage="<http://cr.flyte.org/flyteorg/flytekit:py3.10-1.4.1|cr.flyte.org/flyteorg/flytekit:py3.10-1.4.1>" --remote ./test.py wf
"{{.image.mindmeld.fqn}}:{{.image.mindmeld.version}}"
Seems a template. fqn is full qualified name of the image. version is tag of the image.Abdullah Mobeen
08/30/2023, 5:49 PMYicheng Lu
08/30/2023, 5:54 PMSamhita Alla