-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
[Ray component: Core] Runtime Envs should support package installation with uv #47819
Comments
We will pick it up if there is enough demand from OSS users. |
Sounds like this would be really really great to have!
|
I agree that this would be great. We have moved from |
cc @dentiny |
We've seen a huge increase in speed with uv and would love to see it as an option in Ray |
Hi all, does this interface look reasonable to you? runtime_env = {"pip": {"uv_version": "==0.1.1", "packages":["tensorflow", "requests"], "pip_check": False}} Note the |
What about we completely separate pip plugin and uv plugin:
|
@jjyao I think interface wise it makes sense, but implementation wise we would have quite a few duplicate code between pip vs uv.
|
We can have an implementation that share code between these two plugins. uv doesn't use pip, it just provides a pip like interface. I feel it's cleaner to explicitly separate them and this also gives us flexibility to support uv specific options in the future. cc @pcmoritz for API discussion. |
I think it would be best if Ray did both:
|
Hi I think we have multiple available solutions, just a brief summaries:
If
The interface would look pretty similar to what we have for
In rollout phase, one thing we could do to reduce risk is allow fallback to |
I feel silently changing implementations behind |
And no, we don't want the behavior to depend on "if uv exists on this machine". If we want uv and it does not exist we need to fail instead of falling back to pip. |
@colinjc @dbuades @chainlink any feedbacks on the above API proposals? |
I agree that swapping pip to uv blindly is very risky. They're not as 1:1 compatible as you would think, a lot of code would break due to the stricter constraint checking. In the Ray docs it's mentioned that
I would make it more explicit that this is the Or support both in the same interface?
|
Support for installing packages with |
Sounds good. |
This really sounds like it should be a build step (in CI) instead. Curious to know why would you need to swap lock files at runtime? |
This would be a HUGE improvement for us. Runtime env installation is slow for our use cases, and UV is significantly faster than standard pip installs. Would greatly appreciate if this feature is implemented soon. |
Hi community, I'm working on runtime env setup with uv; |
Sorry for the delayed response, I was playing with Ray and uv today and came back to this thread. We already export the lock to a I think the support for |
Description
uv is a vastly faster at installing Python packages than Conda and Pip, so Ray should enable using it when defining runtime envs.
uv has two interfaces, which would be nice to support separately -
The
uv pip
interface is nearly drop-in compatible with pip with the exception of some outlier packages likejax[tpu]
, and would be nice to have as an option.The
uv sync
interface is nicer, but would only really work by passing a pyproject.toml in as the argument much like runtime env's conda argument accepts a environment yaml path.Use case
Runtime env creation now is quite slow. Having uv support would really improve the ux of iterating changes to a runtime env.
The text was updated successfully, but these errors were encountered: