Skip to content
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

[RuntimeEnv][Java] Support runtime env jars for job. #24725

Merged
merged 37 commits into from
May 16, 2022

Conversation

jovany-wang
Copy link
Contributor

@jovany-wang jovany-wang commented May 12, 2022

Why are these changes needed?

This PR supports specifying the jars(or zip packages) for a job, which are used for all workers for this job.

You can specify jars or zips in the config file of your job:

ray {
  job {
    runtime-env: {
         "jars": [
            "https://my_host/a.jar",
            "https://my_host/b.jar"
         ]
    }
  }
}

or via system properties:

System.setProperty("ray.job.runtime-env.jars.0", "https://my_host/a.jar");
System.setProperty("ray.job.runtime-env.jars.1", "https://my_host/a.jar");
Ray.init();
// all workers of this job will add a.jar and b.jar into the classpath.

Related issue number

#21463

Checks

  • 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 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 :(

@jovany-wang
Copy link
Contributor Author

This should be merged after #24712 due to we refine the tests.

@jovany-wang jovany-wang marked this pull request as ready for review May 13, 2022 02:11
// Note that it supports both jar packages and zip packages.
"jars": [
// "https://my_host.a.jar",
// "https://my_host.b.jar"
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
// "https://my_host.b.jar"
// "https://my_host/b.jar"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Due to all CI cases get green, I'm merging this PR and then change the typo later.

@jovany-wang jovany-wang merged commit d40fa39 into ray-project:master May 16, 2022
@jovany-wang jovany-wang deleted the java-jars-for-job branch May 16, 2022 07:07
maxpumperla pushed a commit that referenced this pull request May 18, 2022
This PR supports specifying the  jars(or zip packages) for a job, which are used for all workers for this job.

You can specify jars or zips in the config file of your job:
```yml
ray {
  job {
    runtime-env: {
         "jars": [
            "https://my_host/a.jar",
            "https://my_host/b.jar"
         ]
    }
  }
}
```
or via system properties:
```java
System.setProperty("ray.job.runtime-env.jars.0", "https://my_host/a.jar");
System.setProperty("ray.job.runtime-env.jars.1", "https://my_host/a.jar");
Ray.init();
// all workers of this job will add a.jar and b.jar into the classpath.
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants