File tree Expand file tree Collapse file tree 2 files changed +33
-0
lines changed
github-actions/nvidia-gpu-operator Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Original file line number Diff line number Diff line change 1
1
name : " Install NVidia GPU operator for KinD"
2
2
description : " Step to install NVidia GPU operator for KinD, based on https://www.substratus.ai/blog/kind-with-gpus"
3
3
4
+ inputs :
5
+ enable-time-slicing :
6
+ description : " Enable time slicing for NVidia GPU operator"
7
+ required : false
8
+ default : ' false'
9
+ time-slicing-capacity :
10
+ description : " Time slicing GPU multiplier"
11
+ required : false
12
+ default : 4
13
+
4
14
runs :
5
15
using : " composite"
6
16
steps :
23
33
run : |
24
34
kubectl describe nodes
25
35
shell : bash
36
+
37
+ - name : Configuring Time-Slicing for NVidia GPU operator
38
+ if : inputs.enable-time-slicing == 'true'
39
+ run : |
40
+ sudo sed -i "s/<REPLICAS>/${{ inputs.time-slicing-capacity }}/" ${GITHUB_ACTION_PATH}/resources/time-slicing-config.yaml
41
+ kubectl create -n gpu-operator -f ${GITHUB_ACTION_PATH}/resources/time-slicing-config.yaml
42
+ kubectl patch clusterpolicies.nvidia.com/cluster-policy -n gpu-operator --type merge -p '{"spec": {"devicePlugin": {"config": {"name": "time-slicing-config", "default": "any"}}}}'
43
+ kubectl wait --timeout=120s --for=jsonpath='{.status.capacity.nvidia\.com/gpu}'=${{ inputs.time-slicing-capacity }} node/cluster-control-plane
44
+ shell : bash
Original file line number Diff line number Diff line change
1
+ apiVersion : v1
2
+ kind : ConfigMap
3
+ metadata :
4
+ name : time-slicing-config
5
+ data :
6
+ any : |-
7
+ version: v1
8
+ flags:
9
+ migStrategy: none
10
+ sharing:
11
+ timeSlicing:
12
+ resources:
13
+ - name: nvidia.com/gpu
14
+ replicas: <REPLICAS>
You can’t perform that action at this time.
0 commit comments