Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/manifests/getting-started/gke/platform-scale.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ spec:
- name: gpu-a100
className: gke-a100-40-1x
nodeCount: 1
minNodeCount: 1 # keep >=1; the autoscaler can't scale a GPU pool up from 0 for DRA pods
minNodeCount: 0
maxNodeCount: 2
zones:
- us-west1-b
Expand All @@ -63,7 +63,7 @@ spec:
- name: gpu-a100
className: gke-a100-40-1x
nodeCount: 1
minNodeCount: 1 # keep >=1; the autoscaler can't scale a GPU pool up from 0 for DRA pods
minNodeCount: 0
maxNodeCount: 2
zones:
- us-east1-b
2 changes: 1 addition & 1 deletion docs/manifests/getting-started/gke/platform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ spec:
- name: gpu-l4
className: gke-l4-1x-g2
nodeCount: 1
minNodeCount: 1 # keep >=1; the autoscaler can't scale a GPU pool up from 0 for DRA pods
minNodeCount: 0
maxNodeCount: 2
zones:
- us-central1-a
10 changes: 10 additions & 0 deletions functions/compose-gke-cluster/function/fn.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,15 @@
_LABEL_GPU = "modelplane.ai/gpu"
_LABEL_POOL = "modelplane.ai/pool"

# GKE's cluster autoscaler uses this label to recognise a node pool as one whose
# nodes run the NVIDIA GPU DRA driver, and so models the DRA ResourceSlices such
# a node would publish. Without it the autoscaler can't tell that a new node
# would satisfy a pod's GPU ResourceClaim, so a pool sitting at zero nodes never
# scales up: the claim binds only against a ResourceSlice, and no slice exists
# until a node is already running. Setting it lets a GPU pool cold-start from
# minNodeCount 0.
_LABEL_GPU_DRA_DRIVER = "cloud.google.com/gke-nvidia-gpu-dra-driver"

# Secret types written to XR status. compose-inference-cluster reads
# these to wire the kubeconfig and SA key into ProviderConfigs. The SA key's
# type is the provider identity it authenticates as (see _IDENTITY_TYPE_GCP).
Expand Down Expand Up @@ -293,6 +302,7 @@ def compose_node_pools(self) -> None:
node_config.labels = {
_LABEL_GPU: pool.gpu.acceleratorType,
_LABEL_POOL: pool.name,
_LABEL_GPU_DRA_DRIVER: "true",
}
else:
node_config.labels = {
Expand Down
2 changes: 2 additions & 0 deletions functions/compose-gke-cluster/tests/test_fn.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ async def test_compose(self) -> None:
"labels": {
"modelplane.ai/gpu": "nvidia-tesla-a100",
"modelplane.ai/pool": "gpu-pool",
"cloud.google.com/gke-nvidia-gpu-dra-driver": "true",
},
},
},
Expand Down Expand Up @@ -636,6 +637,7 @@ async def test_compose(self) -> None:
"labels": {
"modelplane.ai/gpu": "nvidia-tesla-a100",
"modelplane.ai/pool": "gpu-pool",
"cloud.google.com/gke-nvidia-gpu-dra-driver": "true",
},
},
},
Expand Down
Loading