Skip to content

Commit 9198189

Browse files
authored
Add example in GKE to enable Ray resource isolation using cgroupsv2 and writable cgroup containers (#4236)
* Add example in GKE to enable Ray resource isolation using cgroupsv2 and writable cgroup containers Signed-off-by: Andrew Sy Kim <[email protected]> * use lower resource requests Signed-off-by: Andrew Sy Kim <[email protected]> --------- Signed-off-by: Andrew Sy Kim <[email protected]>
1 parent 70bc87e commit 9198189

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
apiVersion: ray.io/v1
2+
kind: RayCluster
3+
metadata:
4+
name: raycluster-resource-isolation
5+
spec:
6+
rayVersion: '2.52.0'
7+
headGroupSpec:
8+
rayStartParams:
9+
enable-resource-isolation: "true" # Set --enable-resource-isolation flag in `ray start`
10+
template:
11+
metadata:
12+
annotations:
13+
node.gke.io/enable-writable-cgroups.ray-head: "true"
14+
spec:
15+
containers:
16+
- name: ray-head
17+
image: rayproject/ray:2.52.0
18+
resources:
19+
limits:
20+
cpu: 2
21+
memory: 8G
22+
requests:
23+
cpu: 2
24+
memory: 8G
25+
ports:
26+
- containerPort: 6379
27+
name: gcs-server
28+
- containerPort: 8265
29+
name: dashboard
30+
- containerPort: 10001
31+
name: client
32+
nodeSelector:
33+
node.gke.io/enable-writable-cgroups: "true"
34+
workerGroupSpecs:
35+
- replicas: 1
36+
minReplicas: 1
37+
maxReplicas: 5
38+
groupName: workergroup
39+
rayStartParams:
40+
enable-resource-isolation: "true" # Set --enable-resource-isolation flag in `ray start`
41+
template:
42+
metadata:
43+
annotations:
44+
node.gke.io/enable-writable-cgroups.ray-worker: "true"
45+
spec:
46+
containers:
47+
- name: ray-worker
48+
image: rayproject/ray:2.52.0
49+
resources:
50+
limits:
51+
cpu: 2
52+
memory: 8G
53+
requests:
54+
cpu: 2
55+
memory: 8G
56+
nodeSelector:
57+
node.gke.io/enable-writable-cgroups: "true"

0 commit comments

Comments
 (0)