diff --git a/docs/user_guide/customizing_dependencies/imagespec.md b/docs/user_guide/customizing_dependencies/imagespec.md index 5a9ef93736..12d9295b1e 100644 --- a/docs/user_guide/customizing_dependencies/imagespec.md +++ b/docs/user_guide/customizing_dependencies/imagespec.md @@ -160,3 +160,17 @@ If you only want to build the image without registering the workflow, you can us ``` 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. + +```bash +FLYTE_FORCE_PUSH_IMAGE_SPEC=True pyflyte run --remote image_spec.py wf +``` + +or + +```python +image = ImageSpec(registry="ghcr.io/flyteorg", packages=["pandas"]).force_push() +```