flytekit.extend.ImageConfig#

class flytekit.extend.ImageConfig(default_image=None, images=None)[source]#

We recommend you to use ImageConfig.auto(img_name=None) to create an ImageConfig. For example, ImageConfig.auto(img_name=””ghcr.io/flyteorg/flytecookbook:v1.0.0””) will create an ImageConfig.

ImageConfig holds available images which can be used at registration time. A default image can be specified along with optional additional images. Each image in the config must have a unique name.

Parameters
Return type

None

default_image#

The default image to be used as a container for task serialization.

Type

Optional[Image]

images#

Optional, additional images which can be used in task container definitions.

Type

List[Image]

__init__(default_image=None, images=None)#
Parameters
Return type

None

Methods

__init__([default_image, images])

auto([config_file, img_name])

Reads from config file or from img_name Note that this function does not take into account the flytekit default images (see the Dockerfiles at the base of this repo).

auto_default_image()

create_from(default_image[, other_images])

find_image(name)

Return an image, by name, if it exists.

from_dict(kvs, *[, infer_missing])

from_images(default_image[, m])

Allows you to programmatically create an ImageConfig. Usually only the default_image is required, unless

from_json(s, *[, parse_float, parse_int, ...])

schema(*[, infer_missing, only, exclude, ...])

to_dict([encode_json])

to_json(*[, skipkeys, ensure_ascii, ...])

validate_image(_, param, values)

Validates the image to match the standard format.

Attributes

dataclass_json_config

default_image

images