Skip to content

docs: add FLYTE_IMAGE_REGISTRY setup step for remote workflow execution#7236

Open
nuthalapativarun wants to merge 2 commits intoflyteorg:masterfrom
nuthalapativarun:docs/missing-env-remote-run-6606
Open

docs: add FLYTE_IMAGE_REGISTRY setup step for remote workflow execution#7236
nuthalapativarun wants to merge 2 commits intoflyteorg:masterfrom
nuthalapativarun:docs/missing-env-remote-run-6606

Conversation

@nuthalapativarun
Copy link
Copy Markdown

Tracking issue

Closes #6606

Why are the changes needed?

The "Running a workflow locally" guide shows the pyflyte run --remote command but does not mention that FLYTE_IMAGE_REGISTRY must be set when the workflow uses ImageSpec. The default project template (basic-template-imagespec) reads this variable to determine where to push the container image. Without it, task execution fails with:

KeyError: 'FLYTE_IMAGE_REGISTRY'

The working command is:

FLYTE_IMAGE_REGISTRY=localhost:30000 pyflyte run --env FLYTE_IMAGE_REGISTRY=localhost:30000 --remote ...

What changes were proposed in this pull request?

In docs/user_guide/getting_started_with_workflow_development/running_a_workflow_locally.md:

  • Added step 6: export FLYTE_IMAGE_REGISTRY=localhost:30000 with a note explaining why the demo cluster registry is needed.
  • Updated the pyflyte run command (now step 7) to include --env FLYTE_IMAGE_REGISTRY=localhost:30000 so task containers also have access to the variable.
  • Fixed a pre-existing step numbering error where the steps jumped from 4 back to 3.

How was this patch tested?

Documentation change only; verified by reading the rendered diff.

Labels

  • fixed

  • I updated the documentation accordingly.

  • All new and existing tests passed.

  • All commits are signed-off.

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 flyteorg#6606

Signed-off-by: Varun Nuthalapati <nuthalapativarun@gmail.com>
@nuthalapativarun nuthalapativarun force-pushed the docs/missing-env-remote-run-6606 branch from a6c983a to 5e0e2c5 Compare April 18, 2026 18:05
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 56.95%. Comparing base (e938b03) to head (1ecf4d6).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7236      +/-   ##
==========================================
- Coverage   56.96%   56.95%   -0.01%     
==========================================
  Files         931      931              
  Lines       58246    58246              
==========================================
- Hits        33178    33175       -3     
- Misses      22014    22017       +3     
  Partials     3054     3054              
Flag Coverage Δ
unittests-datacatalog 53.51% <ø> (ø)
unittests-flyteadmin 53.14% <ø> (ø)
unittests-flytecopilot 43.06% <ø> (ø)
unittests-flytectl 64.09% <ø> (-0.05%) ⬇️
unittests-flyteidl 75.71% <ø> (ø)
unittests-flyteplugins 60.17% <ø> (ø)
unittests-flytepropeller 53.71% <ø> (ø)
unittests-flytestdlib 62.61% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.


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
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need FLYTE_IMAGE_REGISTRY env var in the task?

Suggested change
pyflyte run --remote --env FLYTE_IMAGE_REGISTRY=localhost:30000 -p my-project -d development example.py wf --name Ada
pyflyte run --remote -p my-project -d development example.py wf --name Ada

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Docs] Missing env setup in remote example

2 participants