0.1.dev2184+g1e0cbe7.d20250401

flytekit.image_spec.default_builder

Directory

Classes

Class Description
DefaultImageBuilder Image builder using Docker and buildkit.

Methods

Method Description
create_docker_context() Populate tmp_dir with Dockerfile as specified by the image_spec.
get_flytekit_for_pypi() Get flytekit version on PyPI.
prepare_poetry_lock_command()
prepare_python_executable()
prepare_python_install()
prepare_uv_lock_command()

Methods

create_docker_context()

def create_docker_context(
    image_spec: flytekit.image_spec.image_spec.ImageSpec,
    tmp_dir: pathlib._local.Path,
)

Populate tmp_dir with Dockerfile as specified by the image_spec.

Parameter Type
image_spec flytekit.image_spec.image_spec.ImageSpec
tmp_dir pathlib._local.Path

get_flytekit_for_pypi()

def get_flytekit_for_pypi()

Get flytekit version on PyPI.

prepare_poetry_lock_command()

def prepare_poetry_lock_command(
    image_spec: flytekit.image_spec.image_spec.ImageSpec,
    tmp_dir: pathlib._local.Path,
) -> typing.Tuple[string.Template, typing.List[str]]
Parameter Type
image_spec flytekit.image_spec.image_spec.ImageSpec
tmp_dir pathlib._local.Path

prepare_python_executable()

def prepare_python_executable(
    image_spec: flytekit.image_spec.image_spec.ImageSpec,
) -> flytekit.image_spec.default_builder._PythonInstallTemplate
Parameter Type
image_spec flytekit.image_spec.image_spec.ImageSpec

prepare_python_install()

def prepare_python_install(
    image_spec: flytekit.image_spec.image_spec.ImageSpec,
    tmp_dir: pathlib._local.Path,
) -> str
Parameter Type
image_spec flytekit.image_spec.image_spec.ImageSpec
tmp_dir pathlib._local.Path

prepare_uv_lock_command()

def prepare_uv_lock_command(
    image_spec: flytekit.image_spec.image_spec.ImageSpec,
    tmp_dir: pathlib._local.Path,
) -> typing.Tuple[string.Template, typing.List[str]]
Parameter Type
image_spec flytekit.image_spec.image_spec.ImageSpec
tmp_dir pathlib._local.Path

flytekit.image_spec.default_builder.DefaultImageBuilder

Image builder using Docker and buildkit.

Methods

Method Description
build_image() Build the docker image and push it to the registry.
should_build() Whether or not the builder should build the ImageSpec.

build_image()

def build_image(
    image_spec: flytekit.image_spec.image_spec.ImageSpec,
) -> str

Build the docker image and push it to the registry.

Parameter Type
image_spec flytekit.image_spec.image_spec.ImageSpec

should_build()

def should_build(
    image_spec: flytekit.image_spec.image_spec.ImageSpec,
) -> bool

Whether or not the builder should build the ImageSpec.

Parameter Type
image_spec flytekit.image_spec.image_spec.ImageSpec