Skip to content

[core] Add local:// runtime_env URIs for code already in node - #65245

Open
YashwanthRanjanSingaravel wants to merge 7 commits into
ray-project:masterfrom
YashwanthRanjanSingaravel:feat/image-workdir-support
Open

[core] Add local:// runtime_env URIs for code already in node#65245
YashwanthRanjanSingaravel wants to merge 7 commits into
ray-project:masterfrom
YashwanthRanjanSingaravel:feat/image-workdir-support

Conversation

@YashwanthRanjanSingaravel

Copy link
Copy Markdown
Contributor

Description

  • Adds a local:// runtime_env URI: working_dir: local:///app
  • Used in place with no uploading or unpacking

Changes

  • Protocol.LOCAL: parse_uri returns the path itself, rejects non absolute paths.
  • working_dir/py_modules: no upload or download, 0 bytes cached, never deleted.
  • new section in the docs.

Signed-off-by: YashwanthRanjanSingaravel <yashwanth.ranjansingaravel@anyscale.com>
@YashwanthRanjanSingaravel YashwanthRanjanSingaravel removed their assignment Aug 6, 2026
@YashwanthRanjanSingaravel YashwanthRanjanSingaravel added the go add ONLY when ready to merge, run all tests label Aug 6, 2026
@YashwanthRanjanSingaravel
YashwanthRanjanSingaravel marked this pull request as draft August 6, 2026 00:51

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces support for "local://" URIs in "working_dir" and "py_modules" within Ray's runtime environments, allowing the use of directories already present on all cluster nodes without packaging or uploading them. The review feedback highlights several Windows-specific issues, including a command execution failure when paths contain spaces, and multiple test failures due to Unix-style absolute paths not being recognized as absolute on Windows. Suggestions are provided to make both the runtime execution and the test suite fully cross-platform.

Comment thread python/ray/_private/runtime_env/working_dir.py Outdated
Comment thread python/ray/tests/test_runtime_env_working_dir.py Outdated
Comment thread python/ray/tests/unit/test_runtime_env_validation.py
Comment thread python/ray/tests/unit/test_runtime_env_validation.py
Comment thread python/ray/tests/unit/test_runtime_env_working_dir.py
Comment thread python/ray/tests/unit/test_runtime_env_working_dir.py
Comment thread python/ray/tests/unit/test_runtime_env_working_dir.py
Comment thread python/ray/tests/unit/test_runtime_env_working_dir.py
Comment thread python/ray/tests/unit/test_runtime_env_working_dir.py
Signed-off-by: YashwanthRanjanSingaravel <yashwanth.ranjansingaravel@anyscale.com>
…anSingaravel/ray into feat/image-workdir-support
@YashwanthRanjanSingaravel
YashwanthRanjanSingaravel marked this pull request as ready for review August 6, 2026 18:31

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces support for local:// URIs in runtime_env (working_dir and py_modules), allowing users to reference directories already present on all cluster nodes (such as those baked into container images) without uploading or downloading them. Feedback highlights a potential issue on Windows where using subprocess.list2cmdline to quote paths for cmd.exe shell execution (such as cd) can fail if the path contains shell metacharacters like & but no spaces, suggesting wrapping the path in double quotes directly instead.

Comment thread python/ray/_private/runtime_env/working_dir.py
Comment thread python/ray/_private/runtime_env/working_dir.py
@YashwanthRanjanSingaravel

Copy link
Copy Markdown
Contributor Author

bugbot run

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit b969152. Configure here.

@ray-gardener ray-gardener Bot added docs An issue or change related to documentation core Issues that should be addressed in Ray Core labels Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Issues that should be addressed in Ray Core docs An issue or change related to documentation go add ONLY when ready to merge, run all tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant