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

[Feature] Expose generated ray start command for worker and head nodes. #1560

Closed
1 of 2 tasks
kevingreer opened this issue Oct 23, 2023 · 5 comments · Fixed by #1704
Closed
1 of 2 tasks

[Feature] Expose generated ray start command for worker and head nodes. #1560

kevingreer opened this issue Oct 23, 2023 · 5 comments · Fixed by #1704
Assignees
Labels
enhancement New feature or request

Comments

@kevingreer
Copy link

Search before asking

  • I had searched in the issues and found no similar feature requirement.

Description

KubeRay generates a ray start command to that is executed to start the cluster head node and cluster worker nodes. In a RayService Kubernetes config when specifying the head and worker pod templates, you can add a command field, and that command will be prepended to the generated ray start command, like $CUSTOM_CMD && $GENERATED_CMD. The code for this functionality is here.

This issue requests a feature that allows $GENERATED_CMD to be exposed to the custom command specified in the k8s config. After this feature is implemented, a person would be able to use the KubeRay generated ray start command within their custom command specified in their pod templates.

Use case

I have a binary that wraps arbitrary shell commands. This binary provides some general functionality useful for all services at my company, such as piping logs to our various logging systems. It is run like so:

./wrapper-binary --command "$CMD"

where $CMD can be any arbitrary command. For the use case of this issue, I would like $CMD to be ray start command generated by KubeRay.

Related issues

No response

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!
@kevingreer kevingreer added the enhancement New feature or request label Oct 23, 2023
@hongchaodeng
Copy link
Member

@kevingreer Thanks for putting this together!

We are now in the final stage of releasing v1.0. Will get back on this once v1.0 is released!

@findmyway
Copy link

Any progress on this?

It seems the command is prepended to the Args field.

    Command:
      /bin/bash
      -lc
      --
    Args:
       /usr/local/bin/custom.sh  && ulimit -n 65536; ray start --head  --dashboard-host=0.0.0.0  --metrics-export-port=8080  --block  --num-cpus=1

We'd like to apply it to before the ray start command.

@kevin85421
Copy link
Member

I will work on this issue this week.

@kevin85421
Copy link
Member

We'd like to apply it to before the ray start command.

@findmyway Do you mean ulimit -n 65536; /usr/local/bin/custom.sh; ray start --head --dashboard-host=0.0.0.0 --metrics-export-port=8080 --block --num-cpus=1? Thanks!

@findmyway
Copy link

We'd like to apply it to before the ray start command.

@findmyway Do you mean ulimit -n 65536; /usr/local/bin/custom.sh; ray start --head --dashboard-host=0.0.0.0 --metrics-export-port=8080 --block --num-cpus=1? Thanks!

For my case, I mean ulimit -n 65536; /usr/local/bin/custom.sh ray start --head --dashboard-host=0.0.0.0 --metrics-export-port=8080 --block --num-cpus=1


More details about my usage.

I'm using micromamba in a custom docker image. It has an entrypoint.sh to activate runtime environment ref.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
4 participants