File tree Expand file tree Collapse file tree 7 files changed +21
-17
lines changed Expand file tree Collapse file tree 7 files changed +21
-17
lines changed Original file line number Diff line number Diff line change 33
33
- name : ctr
34
34
image : ubuntu:22.04
35
35
command : ["bash", "-c"]
36
- args : ["nvidia-smi -L; sleep 9999"]
36
+ args : ["nvidia-smi -L; trap 'exit 0' TERM; sleep 9999 & wait "]
37
37
resources :
38
38
claims :
39
39
- name : gpu
54
54
- name : ctr
55
55
image : ubuntu:22.04
56
56
command : ["bash", "-c"]
57
- args : ["nvidia-smi -L; sleep 9999"]
57
+ args : ["nvidia-smi -L; trap 'exit 0' TERM; sleep 9999 & wait "]
58
58
resources :
59
59
claims :
60
60
- name : gpu
Original file line number Diff line number Diff line change @@ -31,14 +31,14 @@ spec:
31
31
- name : ctr0
32
32
image : ubuntu:22.04
33
33
command : ["bash", "-c"]
34
- args : ["nvidia-smi -L; sleep 9999"]
34
+ args : ["nvidia-smi -L; trap 'exit 0' TERM; sleep 9999 & wait "]
35
35
resources :
36
36
claims :
37
37
- name : shared-gpu
38
38
- name : ctr1
39
39
image : ubuntu:22.04
40
40
command : ["bash", "-c"]
41
- args : ["nvidia-smi -L; sleep 9999"]
41
+ args : ["nvidia-smi -L; trap 'exit 0' TERM; sleep 9999 & wait "]
42
42
resources :
43
43
claims :
44
44
- name : shared-gpu
Original file line number Diff line number Diff line change 32
32
- name : ctr
33
33
image : ubuntu:22.04
34
34
command : ["bash", "-c"]
35
- args : ["nvidia-smi -L; sleep 9999"]
35
+ args : ["nvidia-smi -L; trap 'exit 0' TERM; sleep 9999 & wait "]
36
36
resources :
37
37
claims :
38
38
- name : shared-gpu
53
53
- name : ctr
54
54
image : ubuntu:22.04
55
55
command : ["bash", "-c"]
56
- args : ["nvidia-smi -L; sleep 9999"]
56
+ args : ["nvidia-smi -L; trap 'exit 0' TERM; sleep 9999 & wait "]
57
57
resources :
58
58
claims :
59
59
- name : shared-gpu
Original file line number Diff line number Diff line change @@ -68,31 +68,31 @@ spec:
68
68
- name : ctr0
69
69
image : ubuntu:22.04
70
70
command : ["bash", "-c"]
71
- args : ["nvidia-smi -L; sleep 9999"]
71
+ args : ["nvidia-smi -L; trap 'exit 0' TERM; sleep 9999 & wait "]
72
72
resources :
73
73
claims :
74
74
- name : mig-devices
75
75
request : mig-1g-5gb-0
76
76
- name : ctr1
77
77
image : ubuntu:22.04
78
78
command : ["bash", "-c"]
79
- args : ["nvidia-smi -L; sleep 9999"]
79
+ args : ["nvidia-smi -L; trap 'exit 0' TERM; sleep 9999 & wait "]
80
80
resources :
81
81
claims :
82
82
- name : mig-devices
83
83
request : mig-1g-5gb-1
84
84
- name : ctr2
85
85
image : ubuntu:22.04
86
86
command : ["bash", "-c"]
87
- args : ["nvidia-smi -L; sleep 9999"]
87
+ args : ["nvidia-smi -L; trap 'exit 0' TERM; sleep 9999 & wait "]
88
88
resources :
89
89
claims :
90
90
- name : mig-devices
91
91
request : mig-2g-10gb
92
92
- name : ctr3
93
93
image : ubuntu:22.04
94
94
command : ["bash", "-c"]
95
- args : ["nvidia-smi -L; sleep 9999"]
95
+ args : ["nvidia-smi -L; trap 'exit 0' TERM; sleep 9999 & wait "]
96
96
resources :
97
97
claims :
98
98
- name : mig-devices
Original file line number Diff line number Diff line change @@ -54,28 +54,32 @@ spec:
54
54
containers :
55
55
- name : ts-ctr0
56
56
image : nvcr.io/nvidia/k8s/cuda-sample:nbody-cuda11.6.0-ubuntu18.04
57
- args : ["--benchmark", "--numbodies=4226000"]
57
+ command : ["bash", "-c"]
58
+ args : ["trap 'exit 0' TERM; /tmp/sample --benchmark --numbodies=4226000 & wait"]
58
59
resources :
59
60
claims :
60
61
- name : shared-gpus
61
62
request : ts-gpu
62
63
- name : ts-ctr1
63
64
image : nvcr.io/nvidia/k8s/cuda-sample:nbody-cuda11.6.0-ubuntu18.04
64
- args : ["--benchmark", "--numbodies=4226000"]
65
+ command : ["bash", "-c"]
66
+ args : ["trap 'exit 0' TERM; /tmp/sample --benchmark --numbodies=4226000 & wait"]
65
67
resources :
66
68
claims :
67
69
- name : shared-gpus
68
70
request : ts-gpu
69
71
- name : mps-ctr0
70
72
image : nvcr.io/nvidia/k8s/cuda-sample:nbody-cuda11.6.0-ubuntu18.04
71
- args : ["--benchmark", "--numbodies=4226000"]
73
+ command : ["bash", "-c"]
74
+ args : ["trap 'exit 0' TERM; /tmp/sample --benchmark --numbodies=4226000 & wait"]
72
75
resources :
73
76
claims :
74
77
- name : shared-gpus
75
78
request : mps-gpu
76
79
- name : mps-ctr1
77
80
image : nvcr.io/nvidia/k8s/cuda-sample:nbody-cuda11.6.0-ubuntu18.04
78
- args : ["--benchmark", "--numbodies=4226000"]
81
+ command : ["bash", "-c"]
82
+ args : ["trap 'exit 0' TERM; /tmp/sample --benchmark --numbodies=4226000 & wait"]
79
83
resources :
80
84
claims :
81
85
- name : shared-gpus
Original file line number Diff line number Diff line change 72
72
- name : ctr
73
73
image : ubuntu:22.04
74
74
command : ["bash", "-c"]
75
- args : ["nvidia-smi -L; sleep 9999"]
75
+ args : ["nvidia-smi -L; trap 'exit 0' TERM; sleep 9999 & wait "]
76
76
resources :
77
77
claims :
78
78
- name : a100
Original file line number Diff line number Diff line change 15
15
- name : ctr
16
16
image : ubuntu:22.04
17
17
command : ["bash", "-c"]
18
- args : ["nvidia-smi -L; sleep 9999"]
18
+ args : ["nvidia-smi -L; trap 'exit 0' TERM; sleep 9999 & wait "]
19
19
resources :
20
20
claims :
21
21
- name : gpu
41
41
- name : ctr
42
42
image : ubuntu:22.04
43
43
command : ["bash", "-c"]
44
- args : ["nvidia-smi -L; sleep 9999"]
44
+ args : ["nvidia-smi -L; trap 'exit 0' TERM; sleep 9999 & wait "]
45
45
resources :
46
46
claims :
47
47
- name : gpu
You can’t perform that action at this time.
0 commit comments