Skip to content

Commit 0db201b

Browse files
committed
fix comment
Signed-off-by: james <open4pd@4paradigm.com>
1 parent 336b2fe commit 0db201b

5 files changed

Lines changed: 97 additions & 105 deletions

File tree

docs/userguide/biren-device/enable-biren-sharing.md

Lines changed: 45 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -28,24 +28,22 @@ kind: Namespace
2828
metadata:
2929
name: biren-gpu
3030
---
31-
3231
apiVersion: v1
3332
kind: ServiceAccount
3433
metadata:
3534
name: device-plugin-sa
3635
namespace: biren-gpu
3736
---
38-
3937
apiVersion: rbac.authorization.k8s.io/v1
4038
kind: ClusterRole
4139
metadata:
4240
name: birentech-device-plugin
4341
rules:
44-
- apiGroups: [""]
45-
resources:
46-
- nodes
47-
- pods
48-
verbs: ["get", "list", "watch", "update", "patch"]
42+
- apiGroups: [""]
43+
resources:
44+
- nodes
45+
- pods
46+
verbs: ["get", "list", "watch", "update", "patch"]
4947

5048
---
5149
apiVersion: rbac.authorization.k8s.io/v1
@@ -57,9 +55,9 @@ roleRef:
5755
kind: ClusterRole
5856
name: birentech-device-plugin
5957
subjects:
60-
- kind: ServiceAccount
61-
name: device-plugin-sa
62-
namespace: biren-gpu
58+
- kind: ServiceAccount
59+
name: device-plugin-sa
60+
namespace: biren-gpu
6361

6462
---
6563
apiVersion: apps/v1
@@ -81,45 +79,45 @@ spec:
8179
app.kubernetes.io/name: gpu-exporter
8280
spec:
8381
nodeSelector:
84-
birentech.com: gpu
82+
biren: "on"
8583
tolerations:
86-
- key: CriticalAddonsOnly
87-
operator: Exists
88-
- key: birentech.com/gpu
89-
operator: Exists
90-
effect: NoSchedule
84+
- key: CriticalAddonsOnly
85+
operator: Exists
86+
- key: birentech.com/gpu
87+
operator: Exists
88+
effect: NoSchedule
9189
priorityClassName: "system-node-critical"
9290
containers:
93-
- name: k8s-device-plugin
94-
image: projecthami/biren-device-plugin:latest
95-
imagePullPolicy: Always
96-
env:
97-
- name: LD_LIBRARY_PATH
98-
value: /usr/lib
99-
- name: NODE_NAME
100-
valueFrom:
101-
fieldRef:
102-
fieldPath: spec.nodeName
103-
command: ["/root/k8s-device-plugin"]
104-
args: ["--pulse", "300", "--container-runtime", "runc"]
105-
securityContext:
106-
privileged: true
107-
volumeMounts:
108-
- name: dp
109-
mountPath: /var/lib/kubelet/device-plugins
110-
- name: sys
111-
mountPath: /sys
112-
- name: brml
113-
mountPath: /usr/lib
114-
- name: brml-lib
115-
mountPath: /usr/local/birensupa/driver/biren-smi/lib
116-
readOnly: true
117-
- name: brsmi
118-
mountPath: /opt/birentech/bin
119-
- mountPath: /dev
120-
name: device
121-
- name: cdi-config
122-
mountPath: /etc/cdi
91+
- name: k8s-device-plugin
92+
image: projecthami/biren-device-plugin:latest
93+
imagePullPolicy: Always
94+
env:
95+
- name: LD_LIBRARY_PATH
96+
value: /usr/lib
97+
- name: NODE_NAME
98+
valueFrom:
99+
fieldRef:
100+
fieldPath: spec.nodeName
101+
command: ["/root/k8s-device-plugin"]
102+
args: ["--pulse", "300", "--container-runtime", "runc"]
103+
securityContext:
104+
privileged: true
105+
volumeMounts:
106+
- name: dp
107+
mountPath: /var/lib/kubelet/device-plugins
108+
- name: sys
109+
mountPath: /sys
110+
- name: brml
111+
mountPath: /usr/lib
112+
- name: brml-lib
113+
mountPath: /usr/local/birensupa/driver/biren-smi/lib
114+
readOnly: true
115+
- name: brsmi
116+
mountPath: /opt/birentech/bin
117+
- mountPath: /dev
118+
name: device
119+
- name: cdi-config
120+
mountPath: /etc/cdi
123121
serviceAccountName: device-plugin-sa
124122
volumes:
125123
- name: dp
@@ -163,5 +161,6 @@ spec:
163161
```
164162
165163
## Notes
164+
166165
1. When requesting Biren resources, you cannot specify the memory size.
167166
2. SVI partitioning can only split a single card into either two or four partitions.

docs/userguide/biren-device/examples/default-use.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22
title: Allocate Biren Device
33
---
44

5-
This example shows how to request a single Biren device in a plain Kubernetes Pod.
6-
The Pod runs a long-running container image provided by Birentech and requests one `birentech.com/gpu` device through the `resources.limits` section.
7-
You can use this as a starting point and adjust the image and resource limits to fit your own workloads.
5+
This example shows how to request a single Biren device in a plain Kubernetes Pod. The Pod runs a long-running container image provided by Birentech and requests one `birentech.com/gpu` device through the `resources.limits` section. You can use this as a starting point and adjust the image and resource limits to fit your own workloads.
86

97
```yaml
108
apiVersion: v1
@@ -20,4 +18,4 @@ spec:
2018
resources:
2119
limits:
2220
birentech.com/gpu: 1
23-
```
21+
```

i18n/zh/docusaurus-plugin-content-docs/current/userguide/biren-device/enable-biren-sharing.md

Lines changed: 45 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -28,24 +28,22 @@ kind: Namespace
2828
metadata:
2929
name: biren-gpu
3030
---
31-
3231
apiVersion: v1
3332
kind: ServiceAccount
3433
metadata:
3534
name: device-plugin-sa
3635
namespace: biren-gpu
3736
---
38-
3937
apiVersion: rbac.authorization.k8s.io/v1
4038
kind: ClusterRole
4139
metadata:
4240
name: birentech-device-plugin
4341
rules:
44-
- apiGroups: [""]
45-
resources:
46-
- nodes
47-
- pods
48-
verbs: ["get", "list", "watch", "update", "patch"]
42+
- apiGroups: [""]
43+
resources:
44+
- nodes
45+
- pods
46+
verbs: ["get", "list", "watch", "update", "patch"]
4947

5048
---
5149
apiVersion: rbac.authorization.k8s.io/v1
@@ -57,9 +55,9 @@ roleRef:
5755
kind: ClusterRole
5856
name: birentech-device-plugin
5957
subjects:
60-
- kind: ServiceAccount
61-
name: device-plugin-sa
62-
namespace: biren-gpu
58+
- kind: ServiceAccount
59+
name: device-plugin-sa
60+
namespace: biren-gpu
6361

6462
---
6563
apiVersion: apps/v1
@@ -81,45 +79,45 @@ spec:
8179
app.kubernetes.io/name: gpu-exporter
8280
spec:
8381
nodeSelector:
84-
birentech.com: gpu
82+
biren: "on"
8583
tolerations:
86-
- key: CriticalAddonsOnly
87-
operator: Exists
88-
- key: birentech.com/gpu
89-
operator: Exists
90-
effect: NoSchedule
84+
- key: CriticalAddonsOnly
85+
operator: Exists
86+
- key: birentech.com/gpu
87+
operator: Exists
88+
effect: NoSchedule
9189
priorityClassName: "system-node-critical"
9290
containers:
93-
- name: k8s-device-plugin
94-
image: projecthami/biren-device-plugin:latest
95-
imagePullPolicy: Always
96-
env:
97-
- name: LD_LIBRARY_PATH
98-
value: /usr/lib
99-
- name: NODE_NAME
100-
valueFrom:
101-
fieldRef:
102-
fieldPath: spec.nodeName
103-
command: ["/root/k8s-device-plugin"]
104-
args: ["--pulse", "300", "--container-runtime", "runc"]
105-
securityContext:
106-
privileged: true
107-
volumeMounts:
108-
- name: dp
109-
mountPath: /var/lib/kubelet/device-plugins
110-
- name: sys
111-
mountPath: /sys
112-
- name: brml
113-
mountPath: /usr/lib
114-
- name: brml-lib
115-
mountPath: /usr/local/birensupa/driver/biren-smi/lib
116-
readOnly: true
117-
- name: brsmi
118-
mountPath: /opt/birentech/bin
119-
- mountPath: /dev
120-
name: device
121-
- name: cdi-config
122-
mountPath: /etc/cdi
91+
- name: k8s-device-plugin
92+
image: projecthami/biren-device-plugin:latest
93+
imagePullPolicy: Always
94+
env:
95+
- name: LD_LIBRARY_PATH
96+
value: /usr/lib
97+
- name: NODE_NAME
98+
valueFrom:
99+
fieldRef:
100+
fieldPath: spec.nodeName
101+
command: ["/root/k8s-device-plugin"]
102+
args: ["--pulse", "300", "--container-runtime", "runc"]
103+
securityContext:
104+
privileged: true
105+
volumeMounts:
106+
- name: dp
107+
mountPath: /var/lib/kubelet/device-plugins
108+
- name: sys
109+
mountPath: /sys
110+
- name: brml
111+
mountPath: /usr/lib
112+
- name: brml-lib
113+
mountPath: /usr/local/birensupa/driver/biren-smi/lib
114+
readOnly: true
115+
- name: brsmi
116+
mountPath: /opt/birentech/bin
117+
- mountPath: /dev
118+
name: device
119+
- name: cdi-config
120+
mountPath: /etc/cdi
123121
serviceAccountName: device-plugin-sa
124122
volumes:
125123
- name: dp
@@ -163,5 +161,6 @@ spec:
163161
```
164162
165163
## 注意事项
164+
166165
1. 在申请壁仞资源时,**不能**指定显存大小。
167166
2. 使用 SVI 切分时,一张卡只能切成两份或者四份。

i18n/zh/docusaurus-plugin-content-docs/current/userguide/biren-device/examples/default-use.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22
title: 申请壁仞设备
33
---
44

5-
下面的示例展示了如何在一个普通的 Kubernetes Pod 中申请一个翰博半导体的设备。
6-
该 Pod 以长时间运行的方式启动容器,并通过 `resources.limits` 中声明一个 `birentech.com/gpu` 设备。
7-
你可以在此基础上替换镜像、命令或资源配额,以适配自己的业务场景。
5+
下面的示例展示了如何在一个普通的 Kubernetes Pod 中申请一个翰博半导体的设备。该 Pod 以长时间运行的方式启动容器,并通过 `resources.limits` 中声明一个 `birentech.com/gpu` 设备。你可以在此基础上替换镜像、命令或资源配额,以适配自己的业务场景。
86

97
```yaml
108
apiVersion: v1
@@ -20,4 +18,4 @@ spec:
2018
resources:
2119
limits:
2220
birentech.com/gpu: 1
23-
```
21+
```

sidebars.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -229,11 +229,9 @@ module.exports = {
229229
type: "category",
230230
label: "Examples",
231231
key: "biren-examples",
232-
items: [
233-
"userguide/biren-device/examples/default-use"
234-
]
235-
}
236-
]
232+
items: ["userguide/biren-device/examples/default-use"],
233+
},
234+
],
237235
},
238236
{
239237
type: "category",

0 commit comments

Comments
 (0)