-
Notifications
You must be signed in to change notification settings - Fork 581
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update ImageSpec documentation #5748
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5748 +/- ##
=======================================
Coverage 36.21% 36.22%
=======================================
Files 1303 1303
Lines 109644 109644
=======================================
+ Hits 39710 39718 +8
+ Misses 65810 65802 -8
Partials 4124 4124
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Signed-off-by: Kevin Su <pingsutw@apache.org>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some changes requested, otherwise LGTM!
the image using other tools. | ||
This guide demonstrates how to use the `ImageSpec` to customize the container image for your Flyte tasks. | ||
|
||
`ImageSpec` is a mechanism that allows you to specify how to build a container image without requiring a Dockerfile. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
`ImageSpec` is a mechanism that allows you to specify how to build a container image without requiring a Dockerfile. | |
`ImageSpec` allows you to customize the container image for your Flyte tasks without a Dockerfile. |
`ImageSpec` is a way to specify how to build a container image without a Dockerfile. The `ImageSpec` by default will be | ||
converted to an [Envd](https://envd.tensorchord.ai/) config, and the [Envd builder](https://github.com/flyteorg/flytekit/blob/master/plugins/flytekit-envd/flytekitplugins/envd/image_builder.py#L12-L34) will build the image for you. However, you can also register your own builder to build | ||
the image using other tools. | ||
This guide demonstrates how to use the `ImageSpec` to customize the container image for your Flyte tasks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This guide demonstrates how to use the `ImageSpec` to customize the container image for your Flyte tasks. |
This guide demonstrates how to use the `ImageSpec` to customize the container image for your Flyte tasks. | ||
|
||
`ImageSpec` is a mechanism that allows you to specify how to build a container image without requiring a Dockerfile. | ||
This feature provides a flexible and user-friendly way to define the containerization process. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feature provides a flexible and user-friendly way to define the containerization process. |
|
||
`ImageSpec` is a mechanism that allows you to specify how to build a container image without requiring a Dockerfile. | ||
This feature provides a flexible and user-friendly way to define the containerization process. | ||
One of the significant advantages of using ImageSpec is its ability to optimize the image-building process by reusing previously |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One of the significant advantages of using ImageSpec is its ability to optimize the image-building process by reusing previously |
`ImageSpec` is a mechanism that allows you to specify how to build a container image without requiring a Dockerfile. | ||
This feature provides a flexible and user-friendly way to define the containerization process. | ||
One of the significant advantages of using ImageSpec is its ability to optimize the image-building process by reusing previously | ||
downloaded packages from the PyPI and APT caches, thereby speeding up the entire build process. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
downloaded packages from the PyPI and APT caches, thereby speeding up the entire build process. | |
`ImageSpec` speeds up the build process by allowing you to reuse previously downloaded packages from the PyPI and APT caches. |
``` | ||
|
||
There exists an option to override the container image by providing an Image Spec YAML file to the `pyflyte run` or `pyflyte register` command. | ||
## Define ImageSpec in a YAML File | ||
There is an option to override the container image by providing an ImageSpec YAML file to the `pyflyte run` or `pyflyte register` command. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is an option to override the container image by providing an ImageSpec YAML file to the `pyflyte run` or `pyflyte register` command. | |
You can override the container image by providing an ImageSpec YAML file to the `pyflyte run` or `pyflyte register` command. |
@@ -85,19 +200,22 @@ env: | |||
pyflyte run --remote --image image.yaml image_spec.py wf | |||
``` | |||
|
|||
## Build the image without registering the workflow |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
## Build the image without registering the workflow | |
## Build the image without registering the workflow | |
If you only want to build the image without registering the workflow, you can use the `pyflyte build` command. | ||
|
||
``` | ||
pyflyte build --remote image_spec.py wf | ||
``` | ||
|
||
In some cases, you may want to force an image to rebuild, even if the image spec hasn’t changed. If you want to overwrite an existing image, you can pass the `FLYTE_FORCE_PUSH_IMAGE_SPEC=True` to `pyflyte` command or add `force_push()` to the ImageSpec. | ||
## Force Push an Image |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
## Force Push an Image | |
## Force push an image | |
If you only want to build the image without registering the workflow, you can use the `pyflyte build` command. | ||
|
||
``` | ||
pyflyte build --remote image_spec.py wf | ||
``` | ||
|
||
In some cases, you may want to force an image to rebuild, even if the image spec hasn’t changed. If you want to overwrite an existing image, you can pass the `FLYTE_FORCE_PUSH_IMAGE_SPEC=True` to `pyflyte` command or add `force_push()` to the ImageSpec. | ||
## Force Push an Image | ||
In some cases, you may want to force an image to rebuild, even if the image spec hasn’t changed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In some cases, you may want to force an image to rebuild, even if the image spec hasn’t changed. | |
In some cases, you may want to force an image to rebuild, even if the ImageSpec hasn’t changed. |
In some cases, you may want to force an image to rebuild, even if the image spec hasn’t changed. If you want to overwrite an existing image, you can pass the `FLYTE_FORCE_PUSH_IMAGE_SPEC=True` to `pyflyte` command or add `force_push()` to the ImageSpec. | ||
## Force Push an Image | ||
In some cases, you may want to force an image to rebuild, even if the image spec hasn’t changed. | ||
If you want to overwrite an existing image, you can pass the `FLYTE_FORCE_PUSH_IMAGE_SPEC=True` to `pyflyte` command. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you want to overwrite an existing image, you can pass the `FLYTE_FORCE_PUSH_IMAGE_SPEC=True` to `pyflyte` command. | |
To overwrite an existing image, pass the `FLYTE_FORCE_PUSH_IMAGE_SPEC=True` to the `pyflyte` command. |
Thank you @pingsutw! This is going to be very helpful |
What changes were proposed in this pull request?
Update doc and add more examples
Preview: https://flyte--5748.org.readthedocs.build/en/5748/user_guide/customizing_dependencies/imagespec.html