Skip to content

Commit 114c048

Browse files
committed
Merge branch 'master' of github.com:Project-HAMi/dcu-vgpu-device-plugin
2 parents 833c151 + 2165b49 commit 114c048

File tree

2 files changed

+19
-4
lines changed

2 files changed

+19
-4
lines changed

README.md

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,32 @@ The flow of vDCU job is as follows:
1717
* This plugin targets Kubernetes v1.18+.
1818

1919
## 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
2029
```
30+
31+
```bash
2132
$ kubectl apply -f k8s-dcu-rbac.yaml
2233
$ kubectl apply -f k8s-dcu-plugin.yaml
34+
# replace NODE_NAME with your dcu node name
35+
$ kubectl label node NODE_NAME dcu=on
2336
```
2437

2538
## Build
26-
```
39+
```bash
2740
docker build .
2841
```
2942

3043
## Examples
3144

32-
```
45+
```yaml
3346
apiVersion: v1
3447
kind: Pod
3548
metadata:
@@ -53,13 +66,13 @@ spec:
5366
5467
Inside container, use hy-virtual to validate
5568
56-
```
69+
```bash
5770
source /opt/hygondriver/env.sh
5871
hy-virtual -show-device-info
5972
```
6073

6174
There will be output like these:
62-
```
75+
```bash
6376
Device 0:
6477
Actual Device: 0
6578
Compute units: 9

k8s-dcu-plugin.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ spec:
1919
serviceAccountName: dcu-device-plugin
2020
hostPID: true
2121
hostNetwork: true
22+
nodeSelector:
23+
dcu: "on"
2224
tolerations:
2325
- key: CriticalAddonsOnly
2426
operator: Exists

0 commit comments

Comments
 (0)