mirror of
https://github.com/vale981/ray
synced 2025-03-06 18:41:40 -05:00

* prepare for head node * move command runner interface outside _private * remove space * Eric * flake * min_workers in multi node type * fixing edge cases * eric not idle * fix target_workers to consider min_workers of node types * idle timeout * minor * minor fix * test * lint * eric v2 * eric 3 * min_workers constraint before bin packing * Update resource_demand_scheduler.py * Revert "Update resource_demand_scheduler.py" This reverts commit 818a63a2c86d8437b3ef21c5035d701c1d1127b5. * reducing diff * make get_nodes_to_launch return a dict * merge * weird merge fix * auto fill instance types for AWS * Alex/Eric * Update doc/source/cluster/autoscaling.rst * merge autofill and input from user * logger.exception * make the yaml use the default autofill * docs Eric * remove test_autoscaler_yaml from windows tests * lets try changing the test a bit * return test * lets see * edward * Limit max launch concurrency * commenting frac TODO * move to resource demand scheduler * use STATUS UP TO DATE * Eric * make logger of gc freed refs debug instead of info * add cluster name to docker mount prefix directory * grrR * fix tests * moving docker directory to sdk * move the import to prevent circular dependency * smallf fix * ian * fix max launch concurrency bug to assume failing nodes as pending and consider only load_metric's connected nodes as running * small fix * deflake test_joblib * lint * placement groups bypass * remove space * Eric * first ocmmit * lint * exmaple * documentation * hmm * file path fix * fix test * some format issue in docs * modified docs * joblib strikes again on windows * add ability to not start autoscaler/monitor * a * remove worker_default * Remove default pod type from operator * Remove worker_default_node_type from rewrite_legacy_yaml_to_availble_node_types * deprecate useless fields Co-authored-by: Ameer Haj Ali <ameerhajali@ameers-mbp.lan> Co-authored-by: Alex Wu <alex@anyscale.io> Co-authored-by: Alex Wu <itswu.alex@gmail.com> Co-authored-by: Eric Liang <ekhliang@gmail.com> Co-authored-by: Ameer Haj Ali <ameerhajali@Ameers-MacBook-Pro.local> Co-authored-by: root <root@ip-172-31-56-188.us-west-2.compute.internal> Co-authored-by: Dmitri Gekhtman <dmitri.m.gekhtman@gmail.com>
113 lines
4.2 KiB
YAML
113 lines
4.2 KiB
YAML
# An unique identifier for the head node and workers of this cluster.
|
|
cluster_name: lm-cluster
|
|
|
|
# The minimum number of workers nodes to launch in addition to the head
|
|
# node. This number should be >= 0.
|
|
min_workers: 1
|
|
|
|
# The maximum number of workers nodes to launch in addition to the head
|
|
# node. This takes precedence over min_workers.
|
|
max_workers: 2
|
|
|
|
|
|
# If a node is idle for this many minutes, it will be removed.
|
|
idle_timeout_minutes: 5
|
|
|
|
# Cloud-provider specific configuration.
|
|
provider:
|
|
type: aws
|
|
region: us-west-2
|
|
# Availability zone(s), comma-separated, that nodes may be launched in.
|
|
# Nodes are currently spread between zones by a round-robin approach,
|
|
# however this implementation detail should not be relied upon.
|
|
availability_zone: us-west-2a,us-west-2b
|
|
|
|
# How Ray will authenticate with newly launched nodes.
|
|
auth:
|
|
ssh_user: ubuntu
|
|
# By default Ray creates a new private keypair, but you can also use your own.
|
|
# If you do so, make sure to also set "KeyName" in the head and worker node
|
|
# configurations below.
|
|
# ssh_private_key: /path/to/your/key.pem
|
|
|
|
# Provider-specific config for the head node, e.g. instance type. By default
|
|
# Ray will auto-configure unspecified fields such as SubnetId and KeyName.
|
|
# For more documentation on available fields, see:
|
|
# http://boto3.readthedocs.io/en/latest/reference/services/ec2.html#EC2.ServiceResource.create_instances
|
|
head_node:
|
|
InstanceType: m5.xlarge
|
|
ImageId: ami-0b294f219d14e6a82 # Deep Learning AMI (Ubuntu) Version 21.0
|
|
SecurityGroupIds:
|
|
- "{{SecurityGroupId}}"
|
|
# You can provision additional disk space with a conf as follows
|
|
BlockDeviceMappings:
|
|
- DeviceName: /dev/sda1
|
|
Ebs:
|
|
VolumeSize: 100
|
|
|
|
# Additional options in the boto docs.
|
|
|
|
# Provider-specific config for worker nodes, e.g. instance type. By default
|
|
# Ray will auto-configure unspecified fields such as SubnetId and KeyName.
|
|
# For more documentation on available fields, see:
|
|
# http://boto3.readthedocs.io/en/latest/reference/services/ec2.html#EC2.ServiceResource.create_instances
|
|
worker_nodes:
|
|
InstanceType: p3.2xlarge
|
|
ImageId: ami-0b294f219d14e6a82 # Deep Learning AMI (Ubuntu) Version 21.0
|
|
SecurityGroupIds:
|
|
- "{{SecurityGroupId}}"
|
|
# Run workers on spot by default. Comment this out to use on-demand.
|
|
InstanceMarketOptions:
|
|
MarketType: spot
|
|
# Additional options can be found in the boto docs, e.g.
|
|
# SpotOptions:
|
|
# MaxPrice: MAX_HOURLY_PRICE
|
|
|
|
# Additional options in the boto docs.
|
|
|
|
# List of shell commands to run to set up nodes.
|
|
setup_commands:
|
|
# Note: if you're developing Ray, you probably want to create an AMI that
|
|
# has your Ray repo pre-cloned. Then, you can replace the pip installs
|
|
# below with a git checkout <your_sha> (and possibly a recompile).
|
|
- echo 'export PATH="$HOME/anaconda3/envs/pytorch_p36/bin:$PATH"' >> ~/.bashrc;
|
|
source ~/.bashrc;
|
|
pip install -U ray;
|
|
pip install -U fairseq==0.8.0;
|
|
- sudo kill -9 `sudo lsof /var/lib/dpkg/lock-frontend | awk '{print $2}' | tail -n 1`;
|
|
sudo pkill -9 apt-get;
|
|
sudo pkill -9 dpkg;
|
|
sudo dpkg --configure -a;
|
|
sudo apt-get -y install binutils;
|
|
cd $HOME;
|
|
git clone https://github.com/aws/efs-utils;
|
|
cd $HOME/efs-utils;
|
|
./build-deb.sh;
|
|
sudo apt-get -y install ./build/amazon-efs-utils*deb;
|
|
cd $HOME;
|
|
mkdir efs;
|
|
sudo mount -t efs {{FileSystemId}}:/ efs;
|
|
sudo chmod 777 efs;
|
|
|
|
# Custom commands that will be run on the head node after common setup.
|
|
head_setup_commands:
|
|
- pip install boto3==1.4.8 # 1.4.8 adds InstanceMarketOptions
|
|
|
|
# Custom commands that will be run on worker nodes after common setup.
|
|
worker_setup_commands: []
|
|
|
|
# Command to start ray on the head node. You don't need to change this.
|
|
head_start_ray_commands:
|
|
- ray stop
|
|
- ulimit -n 65536;
|
|
ray start --head --port=6379
|
|
--object-manager-port=8076
|
|
--autoscaling-config=~/ray_bootstrap_config.yaml
|
|
|
|
# Command to start ray on worker nodes. You don't need to change this.
|
|
worker_start_ray_commands:
|
|
- ray stop
|
|
- ulimit -n 65536;
|
|
ray start
|
|
--address=$RAY_HEAD_IP:6379
|
|
--object-manager-port=8076
|