<#190 [Feat] Enable setting image in cli> Pull req...
# flyte-github
a
#190 [Feat] Enable setting image in cli Pull request opened by machichima ## Description In v1, user can set the image in cli using
pyflyte run --image image1=imageuri
, we should be able to support the same thing in v2. ## Changes • add
--image
in flyte cli for setting image • add
image.image_refs
in config YAML for settings image name to uri pairs • add
Image.from_ref_name
to enable using image set in cli • match image name from config / cli in
_build_images()
• If no name provided for the image uri in the CLI (e.g.
flyte run --image image_url
), the
image_uri
will be regard as the
default
image uri. If the
image
not set for
TaskEnvironment
, this default image will be used. • add test to ensure the image set in cli can be used by
Image.from_name
and raise error if the image name does not match the one in the config/cli flyteorg/flyte-sdk