From a6da5e10b397bc1fbe50b3d614a41a76664484e7 Mon Sep 17 00:00:00 2001 From: Kevin Su Date: Fri, 9 Feb 2024 12:50:49 -0800 Subject: [PATCH 1/2] update imageSpec doc Signed-off-by: Kevin Su --- .../flyte_project_components.md | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/docs/getting_started_with_workflow_development/flyte_project_components.md b/docs/getting_started_with_workflow_development/flyte_project_components.md index bbd0f66a79..75560ae9fb 100644 --- a/docs/getting_started_with_workflow_development/flyte_project_components.md +++ b/docs/getting_started_with_workflow_development/flyte_project_components.md @@ -55,17 +55,13 @@ The workflow directory also contains an `__init__.py` file to indicate that the The workflow code file in the basic template includes an optional ImageSpec configuration. ImageSpec is a Flyte feature that enables you to build a custom container image without having to write a Dockerfile. To learn more, see the [ImageSpec documentation](https://docs.flyte.org/projects/cookbook/en/latest/auto_examples/customizing_dependencies/image_spec.html#image-spec-example) ```python -# basic_image = ImageSpec( -# name="flytekit", # rename this to your docker image name -# base_image="ghcr.io/flyteorg/flytekit:py3.11-1.10.2", -# # the base image that flytekit will use to build your image -# packages=["example-package"], # packages to add to the base image -# # remove "example-package" before using. -# registry="ghcr.io/unionai-oss", -# # the registry your image will be pushed to -# python_version="3.11" -# # the python version; optional if not different from the base image -# ) +basic_image = ImageSpec( + name="flytekit", # default docker image name + base_image="ghcr.io/flyteorg/flytekit:py3.11-1.10.2", # the base image that flytekit will use to build your image + packages=["pandas"], # python packages to install + registry="ghcr.io/unionai-oss", # the registry your image will be pushed to. + python_version="3.11" # Optional if python is installed in the base image +) ``` ```{note} From 0a7f3b03be5c33b8383cf865afffd11b32d8a2c4 Mon Sep 17 00:00:00 2001 From: Kevin Su Date: Fri, 9 Feb 2024 12:52:16 -0800 Subject: [PATCH 2/2] nit Signed-off-by: Kevin Su --- .../flyte_project_components.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/getting_started_with_workflow_development/flyte_project_components.md b/docs/getting_started_with_workflow_development/flyte_project_components.md index 75560ae9fb..8ce59344c3 100644 --- a/docs/getting_started_with_workflow_development/flyte_project_components.md +++ b/docs/getting_started_with_workflow_development/flyte_project_components.md @@ -56,11 +56,11 @@ The workflow code file in the basic template includes an optional ImageSpec conf ```python basic_image = ImageSpec( - name="flytekit", # default docker image name - base_image="ghcr.io/flyteorg/flytekit:py3.11-1.10.2", # the base image that flytekit will use to build your image - packages=["pandas"], # python packages to install + name="flytekit", # default docker image name. + base_image="ghcr.io/flyteorg/flytekit:py3.11-1.10.2", # the base image that flytekit will use to build your image. + packages=["pandas"], # python packages to install. registry="ghcr.io/unionai-oss", # the registry your image will be pushed to. - python_version="3.11" # Optional if python is installed in the base image + python_version="3.11" # Optional if python is installed in the base image. ) ```