0

许多光线命令需要一个 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 命令行向它提交作业。我真的需要所有这些东西,还是有一个我可以使用的最小配置。

4

1 回答 1

2

这是一个最小的例子

在更详细的示例中,默认值应该很好,因此您不需要进行太多更改。

此外,如果您已经运行了一个 Ray 集群并使用自动缩放器启动了它,您可以通过 提交作业ray exec,请参阅相关文档。有关如何使用它的示例,请参阅此脚本。

于 2019-04-14T06:23:59.803 回答