acoustic-carpenter-78188
06/12/2023, 6:12 PMpyflyte run involving ImageSpec rebuild python and apt dependencies from scratch instead of leveraging cache.
Expected behavior
When an `ImageSpec`definition is not updated, image rebuilds should reuse cached layers where possible to speed up build times.
Additional context to reproduce
1. Create a script, wf.py with the following contents:
from flytekit import task, workflow, ImageSpec
image = ImageSpec(
packages=["smart-open[gcs]"],
apt_packages=["git"],
)
@task(container_image=image)
def my_task() -> str:
return "hello, world!"
@workflow
def my_wf() -> str:
return my_task()
2. Run the following command multiple times:
pyflyte run --remote wf.py my_wf
Screenshots
No response
Are you sure this issue hasn't been raised already?
☑︎ Yes
Have you read the Code of Conduct?
☑︎ Yes
flyteorg/flyte