laptop/dev 机器的 Ray 最小集群配置文件是什么?
What is the minimal cluster config file in Ray for a laptop/dev machine?
很多射线命令需要 CLUSTER_CONFIG 文件。
例如
Usage: ray get-head-ip [OPTIONS] CLUSTER_CONFIG_FILE
Options:
-n, --cluster-name TEXT Override the configured cluster name.
--help Show this message and exit.
提供的示例文件又大又吓人..喜欢..
cluster_name: default
min_workers: 0
max_workers: 0
docker:
image: ""
container_name: ""
target_utilization_fraction: 0.8
idle_timeout_minutes: 5
provider:
type: local
head_ip: YOUR_HEAD_NODE_HOSTNAME
worker_ips: []
auth:
ssh_user: YOUR_USERNAME
ssh_private_key: ~/.ssh/id_rsa
head_node: {}
worker_nodes: {}
file_mounts:
"/tmp/ray_sha": "/YOUR/LOCAL/RAY/REPO/.git/refs/heads/YOUR_BRANCH"
setup_commands: []
head_setup_commands: []
worker_setup_commands: []
setup_commands:
- source activate ray && test -e ray || git clone https://github.com/YOUR_GITHUB/ray.git
- source activate ray && cd ray && git fetch && git reset --hard `cat /tmp/ray_sha`
# - source activate ray && cd ray/python && pip install -e .
head_start_ray_commands:
- source activate ray && ray stop
- source activate ray && ulimit -c unlimited && ray start --head --redis-port=6379 --autoscaling-config=~/ray_bootstrap_config.yaml
worker_start_ray_commands:
- source activate ray && ray stop
- source activate ray && ray start --redis-address=$RAY_HEAD_IP:6379
说我已经有一个 ray 集群 运行,我只想做一些事情,比如使用 ray 命令行向它提交一个作业。我真的需要所有这些东西吗,或者是否有我可以使用的最小配置。
这是一个minimal example。
在更详细的示例中,默认值应该很好,因此您不需要做太多更改。
此外,如果您已经有一个 Ray 集群 运行 并且您使用自动缩放器启动它,您可以通过 ray exec
提交作业,请参阅 the relevant documentation. See this script 了解如何提交的示例使用它。
很多射线命令需要 CLUSTER_CONFIG 文件。
例如
Usage: ray get-head-ip [OPTIONS] CLUSTER_CONFIG_FILE
Options:
-n, --cluster-name TEXT Override the configured cluster name.
--help Show this message and exit.
提供的示例文件又大又吓人..喜欢..
cluster_name: default
min_workers: 0
max_workers: 0
docker:
image: ""
container_name: ""
target_utilization_fraction: 0.8
idle_timeout_minutes: 5
provider:
type: local
head_ip: YOUR_HEAD_NODE_HOSTNAME
worker_ips: []
auth:
ssh_user: YOUR_USERNAME
ssh_private_key: ~/.ssh/id_rsa
head_node: {}
worker_nodes: {}
file_mounts:
"/tmp/ray_sha": "/YOUR/LOCAL/RAY/REPO/.git/refs/heads/YOUR_BRANCH"
setup_commands: []
head_setup_commands: []
worker_setup_commands: []
setup_commands:
- source activate ray && test -e ray || git clone https://github.com/YOUR_GITHUB/ray.git
- source activate ray && cd ray && git fetch && git reset --hard `cat /tmp/ray_sha`
# - source activate ray && cd ray/python && pip install -e .
head_start_ray_commands:
- source activate ray && ray stop
- source activate ray && ulimit -c unlimited && ray start --head --redis-port=6379 --autoscaling-config=~/ray_bootstrap_config.yaml
worker_start_ray_commands:
- source activate ray && ray stop
- source activate ray && ray start --redis-address=$RAY_HEAD_IP:6379
说我已经有一个 ray 集群 运行,我只想做一些事情,比如使用 ray 命令行向它提交一个作业。我真的需要所有这些东西吗,或者是否有我可以使用的最小配置。
这是一个minimal example。
在更详细的示例中,默认值应该很好,因此您不需要做太多更改。
此外,如果您已经有一个 Ray 集群 运行 并且您使用自动缩放器启动它,您可以通过 ray exec
提交作业,请参阅 the relevant documentation. See this script 了解如何提交的示例使用它。