forked from ray-project/ray
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use Anaconda for autoscaling example and add example config for devel… (
ray-project#1361) * Use Anaconda for autoscaling example and add example config for development. * Install Python2 for building the web ui.
- Loading branch information
1 parent
0ae660c
commit 22460ff
Showing
2 changed files
with
99 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
# An unique identifier for the head node and workers of this cluster. | ||
cluster_name: default | ||
|
||
# The minimum number of workers nodes to launch in addition to the head | ||
# node. This number should be >= 0. | ||
min_workers: 2 | ||
|
||
# The maximum number of workers nodes to launch in addition to the head | ||
# node. This takes precedence over min_workers. | ||
max_workers: 2 | ||
|
||
# Cloud-provider specific configuration. | ||
provider: | ||
type: aws | ||
region: us-west-2 | ||
|
||
# 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: m4.16xlarge | ||
ImageId: ami-0def3275 # Default Ubuntu 16.04 AMI. | ||
|
||
# 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: m4.16xlarge | ||
ImageId: ami-0def3275 # Default Ubuntu 16.04 AMI. | ||
|
||
# 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. | ||
|
||
# Files or directories to copy to the head and worker nodes. The format is a | ||
# dictionary from REMOTE_PATH: LOCAL_PATH, e.g. | ||
file_mounts: { | ||
# "/path1/on/remote/machine": "/path1/on/local/machine", | ||
# "/path2/on/remote/machine": "/path2/on/local/machine", | ||
} | ||
|
||
# List of shell commands to run to initialize the head node. | ||
head_init_commands: | ||
# Install basics. | ||
- sudo apt-get update | ||
- sudo apt-get install -y cmake pkg-config build-essential autoconf curl libtool unzip python | ||
# Install Anaconda. | ||
- wget https://repo.continuum.io/archive/Anaconda3-5.0.1-Linux-x86_64.sh | ||
- bash Anaconda3-5.0.1-Linux-x86_64.sh -b -p $HOME/anaconda3 | ||
- echo 'export PATH="$HOME/anaconda3/bin:$PATH"' >> ~/.bashrc | ||
# Build Ray. | ||
- git clone https://github.com/ray-project/ray | ||
- PATH=/home/ubuntu/anaconda3/bin:$PATH pip install -U cloudpickle boto3==1.4.8 | ||
- cd ray/python; PATH=/home/ubuntu/anaconda3/bin:$PATH python setup.py develop | ||
# Start Ray. | ||
- PATH=/home/ubuntu/anaconda3/bin:$PATH ray stop | ||
- PATH=/home/ubuntu/anaconda3/bin:$PATH ray start --head --redis-port=6379 --autoscaling-config=~/ray_bootstrap_config.yaml | ||
|
||
# List of shell commands to run to initialize workers. | ||
worker_init_commands: | ||
# Install basics. | ||
- sudo apt-get update | ||
- sudo apt-get install -y cmake pkg-config build-essential autoconf curl libtool unzip python | ||
# Install Anaconda. | ||
- sudo apt-get update | ||
- wget https://repo.continuum.io/archive/Anaconda3-5.0.1-Linux-x86_64.sh | ||
- bash Anaconda3-5.0.1-Linux-x86_64.sh -b -p $HOME/anaconda3 | ||
- echo 'export PATH="$HOME/anaconda3/bin:$PATH"' >> ~/.bashrc | ||
# Build Ray. | ||
- git clone https://github.com/ray-project/ray | ||
- PATH=/home/ubuntu/anaconda3/bin:$PATH pip install -U cloudpickle boto3==1.4.8 | ||
- cd ray/python; PATH=/home/ubuntu/anaconda3/bin:$PATH python setup.py develop | ||
# Start Ray. | ||
- PATH=/home/ubuntu/anaconda3/bin:$PATH ray stop | ||
- PATH=/home/ubuntu/anaconda3/bin:$PATH ray start --head --redis-address=$RAY_HEAD_IP:6379 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters