forked from intel/platform-aware-scheduling
-
Notifications
You must be signed in to change notification settings - Fork 0
/
same-gpu-example.yaml
58 lines (58 loc) · 1.76 KB
/
same-gpu-example.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
apiVersion: apps/v1
kind: Deployment
metadata:
name: same-gpu-example
spec:
replicas: 1
selector:
matchLabels:
app: same-gpu-example
template:
metadata:
labels:
app: same-gpu-example
annotations:
#List containers that needs to be in same GPU
gas-same-gpu: same-gpu-container1,same-gpu-container3
spec:
containers:
- name: &container1 same-gpu-container1
image: busybox:1.33.1
env:
- name: MY_CONTAINER_NAME
value: *container1
command: ['sh', '-c', 'echo $MY_CONTAINER_NAME && ls -ltr /dev/dri && sleep 6000']
resources:
limits:
gpu.intel.com/i915: 1
gpu.intel.com/millicores: 400
- name: &container2 same-gpu-container2
image: busybox:1.33.1
env:
- name: MY_CONTAINER_NAME
value: *container2
command: ['sh', '-c', 'echo $MY_CONTAINER_NAME && ls -ltr /dev/dri && sleep 6000']
resources:
limits:
gpu.intel.com/i915: 1
gpu.intel.com/millicores: 300
- name: &container3 same-gpu-container3
image: busybox:1.33.1
env:
- name: MY_CONTAINER_NAME
value: *container3
command: ['sh', '-c', 'echo $MY_CONTAINER_NAME && ls -ltr /dev/dri && sleep 6000']
resources:
limits:
gpu.intel.com/i915: 1
gpu.intel.com/millicores: 400
- name: &container4 same-gpu-container4
image: busybox:1.33.1
env:
- name: MY_CONTAINER_NAME
value: *container4
command: ['sh', '-c', 'echo $MY_CONTAINER_NAME && ls -ltr /dev/dri && sleep 6000']
resources:
limits:
gpu.intel.com/i915: 1
gpu.intel.com/millicores: 300