|
| 1 | +apiVersion: cluster.ray.io/v1 |
| 2 | +kind: RayCluster |
| 3 | +metadata: |
| 4 | + name: glue-cluster |
| 5 | +spec: |
| 6 | + # The maximum number of workers nodes to launch in addition to the head node. |
| 7 | + maxWorkers: 10 |
| 8 | + # The autoscaler will scale up the cluster faster with higher upscaling speed. |
| 9 | + # E.g., if the task requires adding more nodes then autoscaler will gradually |
| 10 | + # scale up the cluster in chunks of upscaling_speed*currently_running_nodes. |
| 11 | + # This number should be > 0. |
| 12 | + upscalingSpeed: 0.0 |
| 13 | + # If a node is idle for this many minutes, it will be removed. |
| 14 | + idleTimeoutMinutes: 99999 |
| 15 | + # Specify the pod type for the ray head node (as configured below). |
| 16 | + headPodType: head-node |
| 17 | + # Specify the allowed pod types for this ray cluster and the resources they provide. |
| 18 | + podTypes: |
| 19 | + - name: head-node |
| 20 | + # Minimum number of Ray workers of this Pod type. |
| 21 | + minWorkers: 0 |
| 22 | + # Maximum number of Ray workers of this Pod type. Takes precedence over minWorkers. |
| 23 | + maxWorkers: 0 |
| 24 | + rayResources: {"GPU": 0} |
| 25 | + podConfig: |
| 26 | + apiVersion: v1 |
| 27 | + kind: Pod |
| 28 | + metadata: |
| 29 | + # Automatically generates a name for the pod with this prefix. |
| 30 | + generateName: head- |
| 31 | + spec: |
| 32 | + restartPolicy: Never |
| 33 | + imagePullSecrets: |
| 34 | + - name: artifactory-codeflare-cred |
| 35 | + |
| 36 | + # This volume allocates shared memory for Ray to use for its plasma |
| 37 | + # object store. If you do not provide this, Ray will fall back to |
| 38 | + # /tmp which cause slowdowns if is not a shared memory volume. |
| 39 | + volumes: |
| 40 | + - name: dshm |
| 41 | + emptyDir: |
| 42 | + medium: Memory |
| 43 | + containers: |
| 44 | + - name: ray-node |
| 45 | + image: res-wsched-team-ray-project-docker-local.artifactory.swg-devops.com/codeflare:glue_benchmark-ray1.9-s3 |
| 46 | + env: |
| 47 | + - name: AWS_ACCESS_KEY_ID |
| 48 | + valueFrom: |
| 49 | + secretKeyRef: |
| 50 | + name: glue-s3-creds |
| 51 | + key: AWS_ACCESS_KEY_ID |
| 52 | + - name: AWS_SECRET_ACCESS_KEY |
| 53 | + valueFrom: |
| 54 | + secretKeyRef: |
| 55 | + name: glue-s3-creds |
| 56 | + key: AWS_SECRET_ACCESS_KEY |
| 57 | + - name: ENDPOINT_URL |
| 58 | + valueFrom: |
| 59 | + secretKeyRef: |
| 60 | + name: glue-s3-creds |
| 61 | + key: ENDPOINT_URL |
| 62 | + # Do not change this command - it keeps the pod alive until it is |
| 63 | + # explicitly killed. |
| 64 | + command: ["/bin/bash", "-c", "--"] |
| 65 | + args: ['trap : TERM INT; sleep infinity & wait;'] |
| 66 | + ports: |
| 67 | + - containerPort: 6379 # Redis port |
| 68 | + - containerPort: 10001 # Used by Ray Client |
| 69 | + - containerPort: 8265 # Used by Ray Dashboard |
| 70 | + |
| 71 | + # This volume allocates shared memory for Ray to use for its plasma |
| 72 | + # object store. If you do not provide this, Ray will fall back to |
| 73 | + # /tmp which cause slowdowns if is not a shared memory volume. |
| 74 | + volumeMounts: |
| 75 | + - mountPath: /dev/shm |
| 76 | + name: dshm |
| 77 | + resources: |
| 78 | + requests: |
| 79 | + cpu: "2" |
| 80 | + memory: "32G" |
| 81 | + ephemeral-storage: "60G" |
| 82 | + nvidia.com/gpu: "0" |
| 83 | + limits: |
| 84 | + # The maximum memory that this pod is allowed to use. The |
| 85 | + # limit will be detected by ray and split to use 10% for |
| 86 | + # redis, 30% for the shared memory object store, and the |
| 87 | + # rest for application memory. If this limit is not set and |
| 88 | + # the object store size is not set manually, ray will |
| 89 | + # allocate a very large object store in each pod that may |
| 90 | + # cause problems for other pods. |
| 91 | + cpu: "2" |
| 92 | + memory: "32G" |
| 93 | + ephemeral-storage: "60G" |
| 94 | + nvidia.com/gpu: "0" |
| 95 | + - name: worker-node |
| 96 | + # Minimum number of Ray workers of this Pod type. |
| 97 | + minWorkers: 8 |
| 98 | + # Maximum number of Ray workers of this Pod type. Takes precedence over minWorkers. |
| 99 | + maxWorkers: 8 |
| 100 | + # User-specified custom resources for use by Ray. |
| 101 | + # (Ray detects CPU and GPU from pod spec resource requests and limits, so no need to fill those here.) |
| 102 | + rayResources: {"foo": 1, "bar": 0} |
| 103 | + podConfig: |
| 104 | + apiVersion: v1 |
| 105 | + kind: Pod |
| 106 | + metadata: |
| 107 | + # Automatically generates a name for the pod with this prefix. |
| 108 | + generateName: worker- |
| 109 | + spec: |
| 110 | + restartPolicy: Never |
| 111 | + imagePullSecrets: |
| 112 | + - name: artifactory-codeflare-cred |
| 113 | + volumes: |
| 114 | + - name: dshm |
| 115 | + emptyDir: |
| 116 | + medium: Memory |
| 117 | + containers: |
| 118 | + - name: ray-node |
| 119 | + imagePullPolicy: Always |
| 120 | + image: res-wsched-team-ray-project-docker-local.artifactory.swg-devops.com/codeflare:glue_benchmark-ray1.9-s3 |
| 121 | + env: |
| 122 | + - name: AWS_ACCESS_KEY_ID |
| 123 | + valueFrom: |
| 124 | + secretKeyRef: |
| 125 | + name: glue-s3-creds |
| 126 | + key: AWS_ACCESS_KEY_ID |
| 127 | + - name: AWS_SECRET_ACCESS_KEY |
| 128 | + valueFrom: |
| 129 | + secretKeyRef: |
| 130 | + name: glue-s3-creds |
| 131 | + key: AWS_SECRET_ACCESS_KEY |
| 132 | + - name: ENDPOINT_URL |
| 133 | + valueFrom: |
| 134 | + secretKeyRef: |
| 135 | + name: glue-s3-creds |
| 136 | + key: ENDPOINT_URL |
| 137 | + command: ["/bin/bash", "-c", "--"] |
| 138 | + args: ["trap : TERM INT; sleep infinity & wait;"] |
| 139 | + # This volume allocates shared memory for Ray to use for its plasma |
| 140 | + # object store. If you do not provide this, Ray will fall back to |
| 141 | + # /tmp which cause slowdowns if is not a shared memory volume. |
| 142 | + volumeMounts: |
| 143 | + - mountPath: /dev/shm |
| 144 | + name: dshm |
| 145 | + resources: |
| 146 | + requests: |
| 147 | + cpu: "8" |
| 148 | + memory: "16G" |
| 149 | + nvidia.com/gpu: "1" |
| 150 | + limits: |
| 151 | + # The maximum memory that this pod is allowed to use. The |
| 152 | + # limit will be detected by ray and split to use 10% for |
| 153 | + # redis, 30% for the shared memory object store, and the |
| 154 | + # rest for application memory. If this limit is not set and |
| 155 | + # the object store size is not set manually, ray will |
| 156 | + # allocate a very large object store in each pod that may |
| 157 | + # cause problems for other pods. |
| 158 | + cpu: "8" |
| 159 | + memory: "16G" |
| 160 | + nvidia.com/gpu: "1" |
| 161 | + # Commands to start Ray on the head node. You don't need to change this. |
| 162 | + # Note dashboard-host is set to 0.0.0.0 so that Kubernetes can port forward. |
| 163 | + headStartRayCommands: |
| 164 | + - ray stop |
| 165 | + - ulimit -n 65536; ray start --head --no-monitor --dashboard-host 0.0.0.0 |
| 166 | + # Commands to start Ray on worker nodes. You don't need to change this. |
| 167 | + workerStartRayCommands: |
| 168 | + - ray stop |
| 169 | + - ulimit -n 65536; ray start --address=$RAY_HEAD_IP:6379 |
0 commit comments