【发布时间】:2019-04-13 00:55:32
【问题描述】:
很多光线命令都需要一个 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 命令行向它提交作业。我真的需要所有这些东西吗,或者有没有我可以使用的最小配置。
【问题讨论】:
-
这是一个最小的例子github.com/ray-project/ray/blob/master/python/ray/autoscaler/…。在更详细的示例中,默认值应该很好,因此您不需要进行太多更改。此外,如果您已经有一个 Ray 集群正在运行并且您使用自动缩放器启动它,您可以通过
ray exec提交作业,请参阅ray.readthedocs.io/en/latest/api.html#ray-exec。有关如何使用它的示例,请参阅github.com/ray-project/ray/blob/master/ci/long_running_tests/…。 -
嘿罗伯特,把你的答案放在答案部分,这样我就可以将它们标记为正确的东西......
标签: ray