Launching Cloud Clusters with Ray¶
Ray comes with a built-in cluster launcher that makes deploying a Ray cluster simple.
The cluster launcher will provision resources from a node provider (like AWS EC2 or Kubernetes) to instantiate the specified cluster, and start a Ray cluster on the provisioned resources.
You can configure the Ray Cluster Launcher to use with a cloud provider, an existing Kubernetes cluster, or a private cluster of machines.
# First, run `pip install boto3` and `aws configure`
#
# Create or update the cluster. When the command finishes, it will print
# out the command that can be used to SSH into the cluster head node.
$ ray up ray/python/ray/autoscaler/aws/example-full.yaml
See the AWS section for full instructions.
# First, ``pip install google-api-python-client``
# set up your GCP credentials, and
# create a new GCP project.
#
# Create or update the cluster. When the command finishes, it will print
# out the command that can be used to SSH into the cluster head node.
$ ray up ray/python/ray/autoscaler/gcp/example-full.yaml
See the GCP section for full instructions.
# First, install the Azure CLI
# ``pip install azure-cli azure-core``) then
# login using (``az login``).
#
# Create or update the cluster. When the command finishes, it will print
# out the command that can be used to SSH into the cluster head node.
$ ray up ray/python/ray/autoscaler/azure/example-full.yaml
See the Azure section for full instructions.
Once the Ray cluster is running, you can manually SSH into it or use provided commands like ray attach
, ray rsync-up
, and ray exec
to access it and run Ray programs.
- Launching Cloud Clusters
- Configuring your Cluster
- Cluster Launcher Commands
- Launching a cluster (
ray up
) - Updating an existing cluster (
ray up
) - Running shell commands on the cluster (
ray exec
) - Running Ray scripts on the cluster (
ray submit
) - Attaching to a running cluster (
ray attach
) - Synchronizing files from the cluster (
ray rsync-up/down
) - Monitoring cluster status (
ray dashboard/monitor
) - Common Workflow: Syncing git branches
- Launching a cluster (
Questions or Issues?¶
You can post questions or issues or feedback through the following channels:
Discussion Board: For questions about Ray usage or feature requests.
GitHub Issues: For bug reports.
Ray Slack: For getting in touch with Ray maintainers.
StackOverflow: Use the [ray] tag questions about Ray.