Skip to content

Commit

Permalink
note on imagespec/fast relationship
Browse files Browse the repository at this point in the history
Signed-off-by: Yee Hing Tong <[email protected]>
  • Loading branch information
wild-endeavor committed Sep 6, 2024
1 parent a058fd1 commit aaabdf0
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion docs/flyte_fundamentals/registering_workflows.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ run it with the supplied arguments. As you can see from the expected output, you
can visit the link to the Flyte console to see the progress of your running
execution.

You may also run `run --remote --copy-all`, which is very similar to the above command. As the name suggests, this will copy the source tree rooted at the top-level `__init__.py` file. With this strategy, any modules discoverable on the `PYTHONPATH` will be importable.
You may also run `run --remote --copy all`, which is very similar to the above command. As the name suggests, this will copy the source tree rooted at the top-level `__init__.py` file. With this strategy, any modules discoverable on the `PYTHONPATH` will be importable.

```{note}
`pyflyte run` supports Flyte workflows that import any other user-defined modules that
Expand Down Expand Up @@ -260,6 +260,14 @@ metadata/configuration, it's more secure if they're private.
Learn more about how to pull private image in the {ref}`User Guide <private_images>`.
```

##### Relationship between ImageSpec and Fast Registration
The `ImageSpec` construct available in flytekit also has a mechanism to copy files into the image being built. By default, the way it works is
* if fast register is used, then it's assumed that you don't also want to copy source files into built image.
* if fast register is not used (which is the default for `pyflyte package`, or if `pyflyte register --copy none` is specified), then it's assumed that
you do want source files copied.

In any case, if your `ImageSpec` constructor specifies a `source_root` and the `copy` argument set to something other than `CopyFileDetection.NO_COPY`, then files will be copied regardless of fast registration status.

#### Package your project with `pyflyte package`

You can package your project with the `pyflyte package` command like so:
Expand Down

0 comments on commit aaabdf0

Please sign in to comment.