Skip to main content

Documentation Index

Fetch the complete documentation index at: https://ray-preview.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

The ray CLI manages cluster processes and submits work. The most common commands:

Start and stop processes

ray start --head --port=6379 --num-cpus=8 --num-gpus=1
ray start --address=<head-ip>:6379 --num-cpus=8

ray stop
ray stop shuts down all Ray processes on the current host.

Cluster launcher (VMs)

ray up cluster.yaml         # bring up cluster
ray attach cluster.yaml     # SSH into the head
ray submit cluster.yaml ./my_script.py  # run a script on the cluster
ray exec cluster.yaml "tail -f /tmp/ray/session_latest/logs/raylet.out"
ray rsync_up cluster.yaml ./my_pkg /home/ray/my_pkg
ray down cluster.yaml       # tear it down
A cluster.yaml declares cloud provider, node types, and setup commands. See Launching clusters.

Inspect a cluster

ray status                  # node and resource summary
ray dashboard <host>        # forward dashboard to localhost
ray memory                  # object store usage
ray timeline -o trace.json  # Chrome trace of recent activity

Job submission

ray job submit --address http://<head>:8265 -- python my_script.py
ray job list
ray job logs <job-id>
ray job stop <job-id>
The Jobs API is the recommended way to run code against a remote cluster.

Configuration

ray start --head \
  --port=6379 \
  --dashboard-host=0.0.0.0 \
  --dashboard-port=8265 \
  --resources='{"high_memory": 8}' \
  --temp-dir=/var/ray

Next steps

Kubernetes

Manage Ray with Kubernetes CRDs.

VMs

Use the cluster launcher.