ai-ml/gke-ray/rayserve/stable-diffusion/ray-cluster.yaml (58 lines of code) (raw):

# Copyright 2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # [START gke_ai_ml_gke_ray_rayserve_stable_diffusion_raycluster] apiVersion: ray.io/v1 kind: RayCluster metadata: name: stable-diffusion-cluster spec: rayVersion: '2.37.0' headGroupSpec: rayStartParams: dashboard-host: '0.0.0.0' template: metadata: spec: containers: - name: ray-head image: rayproject/ray:2.37.0 ports: - containerPort: 6379 name: gcs - containerPort: 8265 name: dashboard - containerPort: 10001 name: client - containerPort: 8000 name: serve resources: limits: cpu: "2" ephemeral-storage: "15Gi" memory: "8Gi" requests: cpu: "2" ephemeral-storage: "15Gi" memory: "8Gi" nodeSelector: cloud.google.com/compute-class: Performance cloud.google.com/machine-family: c3d workerGroupSpecs: - replicas: 1 minReplicas: 1 maxReplicas: 4 groupName: gpu-group rayStartParams: {} template: spec: containers: - name: ray-worker image: rayproject/ray:2.37.0-gpu resources: limits: cpu: 4 memory: "16Gi" nvidia.com/gpu: 1 requests: cpu: 3 memory: "16Gi" nvidia.com/gpu: 1 nodeSelector: cloud.google.com/gke-accelerator: nvidia-l4 # [END gke_ai_ml_gke_ray_rayserve_stable_diffusion_raycluster]