Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support file:// for runtime_env working directories in jobs #25062

Merged
merged 17 commits into from
May 24, 2022

Conversation

pcmoritz
Copy link
Contributor

Why are these changes needed?

This makes it possible to use an NFS file system that is shared on a cluster for runtime_env working directories.

Related issue number

Checks

  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

Copy link
Contributor

@edoakes edoakes left a comment

Choose a reason for hiding this comment

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

  1. Is it possible to add a local integration test for this?
  2. Could you add this to the docs at https://docs.ray.io/en/latest/ray-core/handling-dependencies.html#remote-uris ?

@edoakes
Copy link
Contributor

edoakes commented May 23, 2022

Also, does this require a separate installation similar to pip install smart_open[s3]?

@@ -50,12 +50,13 @@ def __new__(cls, value, doc=None):
HTTPS = "https", "Remote https path, assumes everything packed in one zip file."
S3 = "s3", "Remote s3 path, assumes everything packed in one zip file."
GS = "gs", "Remote google storage path, assumes everything packed in one zip file."
NFS = "file", "NFS storage path, assumes everything packed in one zip file."
Copy link
Contributor

Choose a reason for hiding this comment

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

Prefer to just call it file:// to match smart_open and because it can be used more generally. We can suggest in docs that people use this for NFS.

pcmoritz and others added 4 commits May 23, 2022 20:20
Co-authored-by: shrekris-anyscale <92341594+shrekris-anyscale@users.noreply.github.com>
@pcmoritz pcmoritz changed the title Support NFS for runtime_env working directories Support file:// for runtime_env working directories in jobs May 24, 2022
@pcmoritz
Copy link
Contributor Author

Yes, it requires pip install smart_open like the other methods, I updated the documentation accordingly.

@@ -537,6 +537,13 @@ Currently, three types of remote URIs are supported for hosting ``working_dir``

- ``runtime_env = {"working_dir": "gs://example_bucket/example_file.zip"}``

- ``FILE``: ``FILE`` refers to URIs starting with ``file://`` that point to compressed packages stored on a local file system or a network file system.
To use packages via ``FILE`` URIs, you must have the ``smart_open`` library (you can install it using ``pip install smart_open``).
Copy link
Contributor

Choose a reason for hiding this comment

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

Hm, I think we could probably use normal open for this case, just need to find the one line runtime env to special case.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea, I fixed it!

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.

5 participants