1.16.26
flytekitplugins.envd.image_builder
Directory
Classes
| Class | Description |
|---|---|
EnvdImageSpecBuilder |
This class is used to build a docker image using envd. |
Methods
| Method | Description |
|---|---|
create_envd_config() |
|
envd_context_switch() |
|
execute_command() |
Variables
| Property | Type | Description |
|---|---|---|
FLYTE_ENVD_CONTEXT |
str |
|
FLYTE_LOCAL_REGISTRY |
str |
|
REQUIREMENTS_FILE_NAME |
str |
Methods
create_envd_config()
def create_envd_config(
image_spec: flytekit.image_spec.image_spec.ImageSpec,
) -> str| Parameter | Type | Description |
|---|---|---|
image_spec |
flytekit.image_spec.image_spec.ImageSpec |
envd_context_switch()
def envd_context_switch(
registry: str,
)| Parameter | Type | Description |
|---|---|---|
registry |
str |
execute_command()
def execute_command(
command: str,
)| Parameter | Type | Description |
|---|---|---|
command |
str |
flytekitplugins.envd.image_builder.EnvdImageSpecBuilder
This class is used to build a docker image using envd.
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,
)Build the docker image and push it to the registry.
| Parameter | Type | Description |
|---|---|---|
image_spec |
flytekit.image_spec.image_spec.ImageSpec |
image spec of the task. |
Returns: fully_qualified_image_name: Fully qualified image name. If None, then image_spec.image_name() is used.
should_build()
def should_build(
image_spec: flytekit.image_spec.image_spec.ImageSpec,
) -> boolWhether or not the builder should build the ImageSpec.
| Parameter | Type | Description |
|---|---|---|
image_spec |
flytekit.image_spec.image_spec.ImageSpec |
image spec of the task. |
Returns
True if the image should be built, otherwise it returns False.
Raises
| Exception | Description |
|---|---|
RuntimeError |
If FLYTE_IMG_FAST_FAIL is set to True and ImageSpec fails to check if the image exists due to a permission issue or other reason. |