<#5280 Use ImageSpec as default task image> Issue ...
# flytekit
a
#5280 Use ImageSpec as default task image Issue created by pingsutw Motivation: Why do you think this is important? The below task will fail when running on a remote cluster if people use non-fast register. (
pyflyte register --non-fast
or
pyflyte package
+
flytectl register
) That's because flytekit won't download the task code in non-fast mode, and expect the user code to be inside the image.
Copy code
@task()
def t1():
    print("hello world")
Goal: What should the final outcome look like, ideally? Change the default image (`cr.flyte.org/flyteorg/flytekit:py3.8-latest`) to
ImageSpec(base_image=<http://cr.flyte.org/flyteorg/flytekit:py3.8-latest|cr.flyte.org/flyteorg/flytekit:py3.8-latest>)
, so flytekit will build the image at compile time, and copy the user code into the image. https://github.com/flyteorg/flytekit/blob/1bb50675b4a64bb6318813c9a9ddda77ebbcbb47/flytekit/configuration/default_images.py#L16-L27 Describe alternatives you've considered Raise an exception at compile time when
container_name
is None in non-fast mode Propose: Link/Inline OR Additional context No response Are you sure this issue hasn't been raised already? ☑︎ Yes Have you read the Code of Conduct? ☑︎ Yes flyteorg/flyte