Skip to content

Commit

Permalink
docs: improve documentation for overwriting existing images (#5030)
Browse files Browse the repository at this point in the history
Signed-off-by: jason.lai <[email protected]>
  • Loading branch information
jasonlai1218 authored Mar 11, 2024
1 parent 04508c0 commit 05b5543
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs/user_guide/customizing_dependencies/imagespec.md
Original file line number Diff line number Diff line change
Expand Up @@ -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()
```

0 comments on commit 05b5543

Please sign in to comment.