[Docker] Automagically add "runtime=nvidia"#11125
Conversation
|
cc @ray-project/ray-autoscaler |
wuisawesome
left a comment
There was a problem hiding this comment.
Can you also use the flag in example-full.yaml and explain that this sets the --runtime flag?
|
Sounds good @wuisawesome ! |
| container_name: "ray-nvidia-docker-test" # e.g. ray_docker | ||
| run_options: | ||
| - --runtime=nvidia | ||
| disable_automatic_runtime_detection: False |
There was a problem hiding this comment.
Can you leave this out of the examples? It should be an internal flag that users don't need to use.
ericl
left a comment
There was a problem hiding this comment.
Just one comment to remove the internal flag.
|
Ahh, looks like you merged it :) Thanks @ericl |
| # head_image: "rayproject/ray:0.8.7-gpu" | ||
| # head_run_options: | ||
| # - --runtime=nvidia | ||
| # Allow Ray to automatically detect GPUs |
There was a problem hiding this comment.
| # Allow Ray to automatically detect GPUs | |
| # Allow Ray to automatically detect GPUs |
| # head_run_options: | ||
| # - --runtime=nvidia | ||
| # Allow Ray to automatically detect GPUs | ||
| # disable_automatic_runtime_detection: False |
There was a problem hiding this comment.
| # disable_automatic_runtime_detection: False | |
| # disable_automatic_runtime_detection: False |
| container_name: "ray-nvidia-docker-test" # e.g. ray_docker | ||
| run_options: | ||
| - --runtime=nvidia | ||
| disable_automatic_runtime_detection: False |
There was a problem hiding this comment.
| disable_automatic_runtime_detection: False | |
| disable_automatic_runtime_detection: False |
| # if no cached version is present. | ||
| pull_before_run: True | ||
| run_options: [] # Extra options to pass into "docker run" | ||
| disable_automatic_runtime_detection: False |
There was a problem hiding this comment.
| disable_automatic_runtime_detection: False | |
| disable_automatic_runtime_detection: False |
| container_name: "ray-nvidia-docker-test" # e.g. ray_docker | ||
| run_options: | ||
| - --runtime=nvidia | ||
| disable_automatic_runtime_detection: False |
There was a problem hiding this comment.
| disable_automatic_runtime_detection: False | |
| disable_automatic_runtime_detection: False |
| # if no cached version is present. | ||
| pull_before_run: True | ||
| run_options: [] # Extra options to pass into "docker run" | ||
| disable_automatic_runtime_detection: False |
There was a problem hiding this comment.
| disable_automatic_runtime_detection: False | |
| disable_automatic_runtime_detection: False |
| container_name: "ray-nvidia-docker-test" # e.g. ray_docker | ||
| run_options: | ||
| - --runtime=nvidia | ||
| disable_automatic_runtime_detection: False |
There was a problem hiding this comment.
| disable_automatic_runtime_detection: False | |
| disable_automatic_runtime_detection: False |
|
Oh, I didn't realize you wanted it changed from the YAMLs |
ericl
left a comment
There was a problem hiding this comment.
Did you commit the changes? I left the as comments only.
|
@ericl 🤦♂️ 🤦 🤦♂️ 🤦 🤦♂️ 🤦 🤦♂️ 🤦 🤦♂️ 🤦 🤦♂️ 🤦 🤦♂️ 🤦 🤦♂️ 🤦 🤦♂️ 🤦 🤦♂️ 🤦 |
Why are these changes needed?
Users normally need to add
- --runtime=nvidiato enable GPUs inside of their docker container. This PR makes that obsolete by checking if the nvidia runtime is available and opting to use that.An alternate solution is to just always add the following to
run_options:Related issue number
Checks
scripts/format.shto lint the changes in this PR.