-
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
[core] [5/N] Check uv existence before installation #48632
Conversation
Signed-off-by: hjiang <hjiang@anyscale.com>
@@ -62,6 +64,28 @@ async def _install_uv( | |||
logger.info("Installing package uv to %s", virtualenv_path) | |||
await check_output_cmd(uv_install_cmd, logger=logger, cwd=cwd, env=pip_env) | |||
|
|||
# TODO(hjiang): Add an integration test for existence check after | |||
# PR (https://github.com/ray-project/ray/pull/48619) gets merged. |
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.
My planned way to test:
- In integration test with
ray.remote
havinguv
specified, making sure all packages correctly installed; - Call
_check_uv_existence
to make sureuv
does exist in virtual env.
async def _check_uv_existence( | ||
self, path: str, cwd: str, env: dict, logger: logging.Logger | ||
) -> bool: | ||
"""Check and return the existence of `uv` in system executable path.""" |
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.
This is checking the existence of uv
inside the virtualenv we create for the runtime env right
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.
Yes
@@ -91,6 +93,28 @@ async def _install_uv( | |||
logger.info("Installing package uv to %s", virtualenv_path) | |||
await check_output_cmd(uv_install_cmd, logger=logger, cwd=cwd, env=pip_env) | |||
|
|||
# TODO(hjiang): Add an integration test for existence check after | |||
# PR (https://github.com/ray-project/ray/pull/48619) gets merged. |
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.
48619 is merged now.
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.
I just realize it's not a good way to test:
- Runtime env agent runs in a separate process, which means at integration test, I have no access to
UvProcessor
- After task completion, the runtime env is deleted, so virtual env is expected to not found
Signed-off-by: dentiny <dentinyhao@gmail.com>
Signed-off-by: dentiny <dentinyhao@gmail.com>
Signed-off-by: hjiang <hjiang@anyscale.com>
Signed-off-by: hjiang <hjiang@anyscale.com> Signed-off-by: mohitjain2504 <mohit.jain@dream11.com>
This PR checks uv existence before installation, if
uv
version not specified by the users.