Commit ec06e0b2 authored by songlinfeng's avatar songlinfeng 💬
Browse files

Update README.md

parent 4b9ce81e
...@@ -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
```
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment