Created
August 25, 2021 23:21
-
-
Save xwjiang2010/772b799a70b0902ce78acce30574f40a to your computer and use it in GitHub Desktop.
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
# An unique identifier for the head node and workers of this cluster. | |
cluster_name: basic | |
# The maximum number of workers nodes to launch in addition to the head | |
# node. This takes precedence over min_workers. min_workers default to 0. | |
min_workers: 1 | |
initial_workers: 1 | |
max_workers: 1 | |
autoscaling_mode: aggressive | |
target_utilization_fraction: 0.9 | |
# If a node is idle for this many minutes, it will be removed. | |
idle_timeout_minutes: 20 | |
docker: | |
image: "rayproject/ray:nightly-cpu" # You can change this to latest-cpu if you don't need GPU support and want a faster startup | |
# image: "rayproject/ray:1.5.0-cpu" | |
container_name: "ray_container" | |
# If true, pulls latest version of image. Otherwise, `docker run` will only pull the image | |
# if no cached version is present. | |
pull_before_run: True | |
# run_options: [] # Extra options to pass into "docker run" | |
# Cloud-provider specific configuration. | |
provider: | |
type: aws | |
region: us-west-2 | |
availability_zone: us-west-2a | |
# cache_stopped_nodes: False | |
# How Ray will authenticate with newly launched nodes. | |
auth: | |
ssh_user: ubuntu | |
ssh_private_key: ~/Documents/aws_secrets/xwjiang-test.pem | |
head_node: | |
InstanceType: m5.xlarge | |
ImageId: latest_dlami | |
KeyName: xwjiang-test | |
# InstanceMarketOptions: | |
# MarketType: spot | |
# SpotOptions: | |
# MaxPrice: "9.0" | |
worker_nodes: | |
InstanceType: m5.xlarge | |
ImageId: latest_dlami | |
KeyName: xwjiang-test | |
# # Run workers on spot by default. Comment this out to use on-demand. | |
# InstanceMarketOptions: | |
# MarketType: spot | |
# SpotOptions: | |
# MaxPrice: "9.0" | |
file_mounts: { | |
/home/ray/anaconda3/lib/python3.7/site-packages/ray/tune: /Users/xwjiang/ray/python/ray/tune, | |
} | |
initialization_commands: [] | |
setup_commands: | |
- pip install -U boto3 | |
- pip install ipdb # ray[rllib] #torch torchvision | |
# Custom commands that will be run on the head node after common setup. | |
head_setup_commands: [] | |
# 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 | |
- unset RAY_OVERRIDE_RESOURCES && ray start --head --num-cpus=1 --port=6379 --object-manager-port=8076 --autoscaling-config=~/ray_bootstrap_config.yaml --object-store-memory=1000000000 | |
# Command to start ray on worker nodes. You don't need to change this. | |
worker_start_ray_commands: | |
- ray stop | |
- unset RAY_OVERRIDE_RESOURCES && ray start --address=$RAY_HEAD_IP:6379 --object-manager-port=8076 --object-store-memory=1000000000 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment