From 5e0e2c5dbcf841806f0a1af93fafd9d6bf7a4d3d Mon Sep 17 00:00:00 2001 From: Varun Nuthalapati Date: Sat, 18 Apr 2026 11:01:44 -0700 Subject: [PATCH] docs: add FLYTE_IMAGE_REGISTRY setup step for remote workflow execution When running workflows remotely on a demo cluster using ImageSpec, pyflyte needs FLYTE_IMAGE_REGISTRY set to push the container image to the local registry. Without this, tasks that reference os.environ['FLYTE_IMAGE_REGISTRY'] fail at runtime. Add a step to export FLYTE_IMAGE_REGISTRY=localhost:30000 before pyflyte run, and pass it via --env so task containers also have access to the variable. Fix the pre-existing step numbering error (steps jumped from 4 back to 3). Closes #6606 Signed-off-by: Varun Nuthalapati --- .../running_a_workflow_locally.md | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/docs/user_guide/getting_started_with_workflow_development/running_a_workflow_locally.md b/docs/user_guide/getting_started_with_workflow_development/running_a_workflow_locally.md index 921657b114a..4ecc0b1e056 100644 --- a/docs/user_guide/getting_started_with_workflow_development/running_a_workflow_locally.md +++ b/docs/user_guide/getting_started_with_workflow_development/running_a_workflow_locally.md @@ -132,13 +132,22 @@ flytectl create project \ --description "My Flyte project" \ --name "My project" ``` -3. On the command line, navigate to the workflows directory of your Flyte project: +5. On the command line, navigate to the workflows directory of your Flyte project: ```{prompt} bash $ cd my_project/workflows ``` -4. Run the workflow on the Flyte cluster with `pyflyte run` using the `--remote` flag and additional parameters for the project name and domain. In this example, you can also optionally pass a `name` parameter to the workflow: +6. Export the `FLYTE_IMAGE_REGISTRY` environment variable to point to the demo cluster's local image registry: ```{prompt} bash $ -pyflyte run --remote -p my-project -d development example.py wf --name Ada +export FLYTE_IMAGE_REGISTRY=localhost:30000 +``` + +:::{note} +The demo cluster ships with a local Docker registry on `localhost:30000`. When your workflow uses [ImageSpec](https://docs.flyte.org/en/latest/user_guide/customizing_dependencies/imagespec.html) to build and push a container image, Flytekit reads `FLYTE_IMAGE_REGISTRY` to determine where to push the image. Setting this variable in your shell ensures the image is pushed to the demo cluster's registry so that task pods can pull it. +::: + +7. Run the workflow on the Flyte cluster with `pyflyte run` using the `--remote` flag and additional parameters for the project name and domain. In this example, you can also optionally pass a `name` parameter to the workflow: +```{prompt} bash $ +pyflyte run --remote --env FLYTE_IMAGE_REGISTRY=localhost:30000 -p my-project -d development example.py wf --name Ada ``` You should see a URL to the workflow execution on your demo Flyte cluster, where `` is a unique identifier for the workflow execution: