-
Notifications
You must be signed in to change notification settings - Fork 338
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
[RayJob]: Best way to upload a local working directory to a Ray cluster using RayJob #2200
Comments
RayJob works best for running ephemeral clusters that are cleaned up after running a single job. However, if you want to run additional jobs on the same RayCluster used for a RayJob, you can just use Ray CLI to submit new jobs:
|
@aybidi if you're users are looking to submit adhoc jobs to a cluster, I think you're better off creating RayClusters for them instead of using RayJob. |
Our use case is also ephemeral. We want the users to run a command like Right now, we achieve it using RayCluster manifest (to create the cluster) and |
Also please let me know if you need more context -- happy to discuss it |
Ah, gotcha -- sorry for misunderstanding. It sounds like you just need to convert the |
Thanks for the reply! We have figured out that bit (creating a cluster and setting the entrypoint). We're struggling to understand how users can upload their local working dir to the Ray cluster created. Using apiVersion: ray.io/v1
kind: RayJob
metadata:
name: rayjob-sample
spec:
entrypoint: python /home/ray/samples/sample_code.py
runtimeEnvYAML: |
working_dir: ... it expects the |
I don't think this is supported. RayJob assumes the source code is available inside the container. It can reference remote zip files though (example), so maybe you can add some logic in your CLI to upload the local working directory and reference it in the RayJob? @kevin85421 do you know if there's any other workaround? |
providing some more context: So if a user has a bunch of scripts in their local dev environment:
and they want to run |
Online examples in your samples suggest creating a |
The ConfigMap was just used as an example but I don't think we would recommend this for real world use-cases (@kevin85421 correct me if I'm wrong). As soon as you need to reference multiple files / dependencies it wouldn't scale well. I think your best bet is to add logic in your internal tool to upload remote zip of the working directory or upload a new container image that includes your local change. |
I see in the rayjob entrypoint, user could clone a project and run it. But I am not sure if there's GitHub Enterprise integration with Rayjob to make Rayjob easier to use. @andrewsykim , do you know if it's supported? |
Hi @aybidi, @andrewsykim and I will sync next week to discuss this issue. I will keep you updated. |
@andrewsykim and I are working on a document: https://docs.google.com/document/d/1hCJsrCFYPJLS3Zusdr8N_4Y5leWUMy4bQEbsqSQp2mw/edit?usp=sharing. It is still WIP, but feel free to comment and share your feedback. |
In our ML platform, we want to enable users to run their jobs using our CLI. On the backend, we want to leverage the RayJob manifest to create the Ray cluster for them and then run their job on it.
What's the best way to upload a local working directory (in our case, our user's local working environment) to the Ray cluster created by the RayJob manifest? We already use Ray's
JobSubmissionClient
and using it, we can do so by setting theruntime_env
'sworking_dir
. How do we achieve something similar with the RayJob manifest?The text was updated successfully, but these errors were encountered: