File tree 2 files changed +19
-4
lines changed
2 files changed +19
-4
lines changed Original file line number Diff line number Diff line change @@ -17,19 +17,32 @@ The flow of vDCU job is as follows:
17
17
* This plugin targets Kubernetes v1.18+.
18
18
19
19
## Deployment
20
+
21
+ ### Prepare
22
+ ``` bash
23
+ # on the dcu node, create these directory:
24
+ $ mkdir /etc/vdev
25
+ ```
26
+ ``` bash
27
+ # should change dtk-xx.xx.x to your installed dtk version
28
+ $ cp -r /opt/dtk-xx.xx.x /opt/dtk
20
29
```
30
+
31
+ ``` bash
21
32
$ kubectl apply -f k8s-dcu-rbac.yaml
22
33
$ kubectl apply -f k8s-dcu-plugin.yaml
34
+ # replace NODE_NAME with your dcu node name
35
+ $ kubectl label node NODE_NAME dcu=on
23
36
```
24
37
25
38
## Build
26
- ```
39
+ ``` bash
27
40
docker build .
28
41
```
29
42
30
43
## Examples
31
44
32
- ```
45
+ ``` yaml
33
46
apiVersion : v1
34
47
kind : Pod
35
48
metadata :
@@ -53,13 +66,13 @@ spec:
53
66
54
67
Inside container, use hy-virtual to validate
55
68
56
- ```
69
+ ` ` ` bash
57
70
source /opt/hygondriver/env.sh
58
71
hy-virtual -show-device-info
59
72
```
60
73
61
74
There will be output like these:
62
- ```
75
+ ``` bash
63
76
Device 0:
64
77
Actual Device: 0
65
78
Compute units: 9
Original file line number Diff line number Diff line change 19
19
serviceAccountName : dcu-device-plugin
20
20
hostPID : true
21
21
hostNetwork : true
22
+ nodeSelector :
23
+ dcu : " on"
22
24
tolerations :
23
25
- key : CriticalAddonsOnly
24
26
operator : Exists
You can’t perform that action at this time.
0 commit comments