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.

Credentials

gcloud auth application-default login
gcloud config set project my-project

Cluster config

cluster_name: ray-gcp
provider:
  type: gcp
  region: us-central1
  availability_zone: us-central1-a
  project_id: my-project
auth:
  ssh_user: ubuntu
max_workers: 8
available_node_types:
  head:
    node_config:
      machineType: n1-standard-4
      disks:
        - boot: true
          autoDelete: true
          type: PERSISTENT
          initializeParams:
            diskSizeGb: 100
            sourceImage: projects/deeplearning-platform-release/global/images/family/common-cu118
  worker:
    min_workers: 1
    max_workers: 8
    node_config:
      machineType: n1-standard-8
head_node_type: head
setup_commands:
  - pip install -U "ray[default]==2.43.0"

Bring up

ray up gcp-cluster.yaml

Service account

The instances use the default Compute Engine service account. To restrict scopes:
provider:
  type: gcp
  service_account: ray-launcher@my-project.iam.gserviceaccount.com

Preemptible instances

node_config:
  scheduling:
    - preemptible: true

Next steps

Azure

Azure equivalent.

Autoscaling

Tune the autoscaler.