Skip to content

Conversation

fscnick
Copy link
Contributor

@fscnick fscnick commented May 25, 2025

Why are these changes needed?

To provide the guide for the user who wants to use uv with kuberay.

Related issue number

Checks

  • I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • 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 added any new APIs to the API Reference. For example, if I added a
      method in Tune, I've added it in doc/source/tune/api/ under the
      corresponding .rst file.
  • 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 :(

Signed-off-by: fscnick <fscnick.dev@gmail.com>
@fscnick
Copy link
Contributor Author

fscnick commented May 25, 2025

The version 1.4.0 is not released yet. Use nightly instead.

result 01 result 02

fscnick added 2 commits May 26, 2025 22:32
Signed-off-by: fscnick <fscnick.dev@gmail.com>
Signed-off-by: fscnick <fscnick.dev@gmail.com>

This guide is the basic setting about how to build a custom image with uv as a package manager. For best practices, please reference https://github.com/astral-sh/uv-docker-example.

The following example uses `kind` and `helm` to demostrate deploying to kubernetes.

Choose a reason for hiding this comment

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

demostrate demonstrate :)

kind load docker-image ray-uv:demo
```

Prepare RayCluster yaml file `ray-cluster.uv.yaml` with the following steps:

Choose a reason for hiding this comment

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

Thanks for the detailed guide, would be really awesome if we also add an example ray-cluster.uv.yaml file. Or just a short example inline.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for reviewing it. I have added an example below.

fscnick added 4 commits May 27, 2025 21:47
Signed-off-by: fscnick <fscnick.dev@gmail.com>
Signed-off-by: fscnick <fscnick.dev@gmail.com>
Signed-off-by: fscnick <fscnick.dev@gmail.com>
Signed-off-by: fscnick <fscnick.dev@gmail.com>
@fscnick fscnick marked this pull request as ready for review May 27, 2025 15:44
@fscnick fscnick requested review from pcmoritz, kevin85421 and a team as code owners May 27, 2025 15:44
@fscnick
Copy link
Contributor Author

fscnick commented May 27, 2025

@kevin85421 PTAL

Copy link
Member

@kevin85421 kevin85421 left a comment

Choose a reason for hiding this comment

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

why do we need to build an image?

Signed-off-by: fscnick <fscnick.dev@gmail.com>
@fscnick
Copy link
Contributor Author

fscnick commented May 30, 2025

why do we need to build an image?

It seems not necessary to build an image because the more recent image has shipped with uv already. I have remove building the image from the guide.

Additionally, here is the screenshot of result.
run result

Signed-off-by: fscnick <fscnick.dev@gmail.com>
@fscnick
Copy link
Contributor Author

fscnick commented May 31, 2025

Discuss @kevin85421 move ray-cluster.uv.yaml to ray-project/kuberay#3720. Left some steps here.

Copy link
Member

@MortalHappiness MortalHappiness left a comment

Choose a reason for hiding this comment

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

LGTM from the technical aspect. Still need the doc team's review.

Signed-off-by: Kai-Hsun Chen <kaihsun@apache.org>
Copy link
Member

@kevin85421 kevin85421 left a comment

Choose a reason for hiding this comment

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

Hi @fscnick,

I pushed a commit to this branch: 5b1cc3b. Can you:

Thanks!

fscnick added 4 commits June 2, 2025 21:34
Signed-off-by: fscnick <fscnick.dev@gmail.com>
Signed-off-by: fscnick <fscnick.dev@gmail.com>
Signed-off-by: fscnick <fscnick.dev@gmail.com>
Signed-off-by: fscnick <fscnick.dev@gmail.com>
@fscnick
Copy link
Contributor Author

fscnick commented Jun 2, 2025

Hi @fscnick,

I pushed a commit to this branch: 5b1cc3b. Can you:

Thanks!

Hi @kevin85421,

I have verified the instructions except using nightly build, fixing vale and moving to user-guides.

verify

Copy link
Member

@kevin85421 kevin85421 left a comment

Choose a reason for hiding this comment

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

Nice!

.vale.ini Outdated
@@ -19,3 +19,6 @@ Google.Colons = No
# TODO(@bveeramani): We're temporarily disabling "Heading". In the future, we'll update
# all headings and enable this rule.
Google.Headings = No

# Ignore the (xxx-xxx...)= in a file because it is doc ref.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# Ignore the (xxx-xxx...)= in a file because it is doc ref.
# Ignores the pattern `(xxx-xxx...)=` used as anchors for headers.

Please confirm this is correct.

Copy link
Member

Choose a reason for hiding this comment

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

@fscnick Could you open an issue and a follow-up PR for the change to .vale.ini? We can remove the change from this PR.

It's OK if (kuberay-uv)= doesn't follow Vale rules—this usage appears throughout the entire codebase.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Opened. #53516

kevin85421 and others added 2 commits June 2, 2025 10:33
Signed-off-by: Kai-Hsun Chen <kaihsun@apache.org>
Co-authored-by: Douglas Strodtman <douglas@anyscale.com>
Signed-off-by: Kai-Hsun Chen <kaihsun@apache.org>
@kevin85421 kevin85421 requested a review from dstrodtman June 2, 2025 17:35
@kevin85421
Copy link
Member

cc @pcmoritz Just a heads-up: we’ll start promoting uv starting with KubeRay v1.4.0, which is coming out soon.

@kevin85421 kevin85421 added the go add ONLY when ready to merge, run all tests label Jun 2, 2025
@kevin85421
Copy link
Member

@dstrodtman would you mind approving this PR if it looks good to you? Thanks!

# ['Python is 👍', 'Python is 👍', 'Python is 👍', 'Python is 👍', 'Python is 👍', 'Python is 👍', 'Python is 👍', 'Python is 👍', 'Python is 👍', 'Python is 👍']
```

> NOTE: Use `/bin/bash -c` to execute the command while changing the current directory to `/home/ray/samples`. The default `working_dir` would be the current directory.
Copy link
Contributor

Choose a reason for hiding this comment

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

Just confirming: this instruction and description are to let the user set the working_dir to /home/ray/samples

Copy link
Member

Choose a reason for hiding this comment

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

yes

Signed-off-by: Kai-Hsun Chen <kaihsun@apache.org>
@kevin85421
Copy link
Member

@dstrodtman thank you for the quick review!

```

The `ray-cluster.uv.yaml` YAML file contains a RayCluster custom resource and a ConfigMap that includes a sample Ray Python script.
* The `RAY_RUNTIME_ENV_HOOK` feature flag enables the `uv` integration in Ray. Future versions may enable this by default.
Copy link
Contributor

Choose a reason for hiding this comment

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

Yes that's right, the PR for this has actually already been merged #53060, will be released with Ray 2.47 :)

Obviously we need to leave this in the docs right now, but after Ray 2.47 is released let's add a note that this is not needed any more in Ray >= 2.47.

Copy link
Member

Choose a reason for hiding this comment

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

open an issue to track the progress: ray-project/kuberay#3732

@kevin85421
Copy link
Member

cc @pcmoritz / @jjyao / @edoakes would you mind merging this PR? Thanks!

@jjyao jjyao merged commit d384e77 into ray-project:master Jun 2, 2025
5 checks passed
@fscnick fscnick deleted the add-kuberay-uv-doc branch June 3, 2025 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
go add ONLY when ready to merge, run all tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants