Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
songlinfeng
container-toolkit
Commits
ec06e0b2
Commit
ec06e0b2
authored
Dec 03, 2025
by
songlinfeng
💬
Browse files
Update README.md
parent
4b9ce81e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
0 deletions
+41
-0
README.md
README.md
+41
-0
No files found.
README.md
View file @
ec06e0b2
...
@@ -12,6 +12,18 @@ DCU Container Toolkit 使用户能够构建和运行使用DCU设备的容器,该
...
@@ -12,6 +12,18 @@ DCU Container Toolkit 使用户能够构建和运行使用DCU设备的容器,该
-
cdi 需要Docker version 25+
-
cdi 需要Docker version 25+
首先确保已经安装好驱动。
首先确保已经安装好驱动。
### 编译
若联网编译则可以使用如下命令编译,会启动一个docker容器进行编译
```
sh
make rocky8
或
make ubuntu22.04
```
若要离线编译则执行如下命令,当前只迟早rpm包
```
sh
build.sh
```
### 安装
### 安装
使用 dpkg/rpm -i 进行安装。安装后会自动执行以下命令
使用 dpkg/rpm -i 进行安装。安装后会自动执行以下命令
...
@@ -309,3 +321,32 @@ DCU Id UUID
...
@@ -309,3 +321,32 @@ DCU Id UUID
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
```
```
### 支持vDCU挂载docker
支持vDCU挂载docker容器,在启动时使用 -e VDCU_VISIBLE_DEVICES环境变量来启动容器,vDCU的约束条件请查看
[
DCU虚拟化用户指南
](
https://download.sourcefind.cn:65024/directlink/5/Kubernetes%E6%8F%92%E4%BB%B6/DCU%E8%99%9A%E6%8B%9F%E5%8C%96%E7%94%A8%E6%88%B7%E6%8C%87%E5%8D%97.pdf
)
```
#对第0块DCU分成4块vDCU,每个vDCU显存8G,每个vDCU计算单元30
$ hy-smi virtual -d 0 -create-vdevices 4 -vdevice-compute-units 30,30,30,30 -vdevice-memory-size 8192,8192,8192,8192
#查看分配好的vDCU
$ hy-smi virtual --show-vdevice-info
Virtual Device 0:
Physical Device: 0
Compute units: 30
Global memory: 8589934592 bytes
Virtual Device 1:
Physical Device: 0
Compute units: 30
Global memory: 8589934592 bytes
Virtual Device 2:
Physical Device: 0
Compute units: 30
Global memory: 8589934592 bytes
Virtual Device 3:
Physical Device: 0
Compute units: 30
Global memory: 8589934592 bytes
#使用docker run启动容器
$ docker run --rm -e VDCU_VISIBLE_DEVICES=1,2 -it a4dd5be0ca23 /bin/bash
```
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment