-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Implement basic runtime env plugin mechanism #19044
Conversation
@architkulkarni FYI |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Thanks for getting this in so quickly.
self.known_fields: Set[str] = { | ||
"working_dir", "conda", "pip", "uris", "containers", "env_vars", | ||
"_ray_release", "_ray_commit", "_inject_current_ray", "plugins" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this need to be a field of self
? prefer to just make it a global constant
Merging as windows tests skipped and relevant tests all passes |
@krfricke It's possible that with this PR we can do the stdin/stdout capture for the Ray client without modifying core Ray |
This PR implements a very basic and experimental version of pluggable runtime environment.
In particular, it supports loading an out-of-tree runtime env plugin that can:
There are a lot of limitation at the moment:
See here for the interface for the plugin you need to write.
Here is a simple example to configure process niceness score using the
nice
command, falling into the "modify python executable prefix" category.We will define a plugin inside
my_module.py
. I would recommend to put this in an actual python package when running in production.my_module.py
:app.py
:Checks
scripts/format.sh
to lint the changes in this PR.