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
3f9e28c9
Commit
3f9e28c9
authored
Nov 12, 2025
by
songlinfeng
💬
Browse files
Update README.md
parent
12ff5a7d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
README.md
README.md
+5
-5
No files found.
README.md
View file @
3f9e28c9
...
...
@@ -10,7 +10,7 @@ DCU Container Toolkit 使用户能够构建和运行使用DCU设备的容器,该
## 使用
-
--gpus需要Docker version 19+
-
cdi 需要Docker version 25+
首先确保已经安装好
DTK
。
首先确保已经安装好
驱动
。
### 安装
...
...
@@ -38,9 +38,9 @@ $ docker run -it --gpus '"device=0,2"' ubuntu:18.04 #添加第0号和第2号GPU
#### 通过环境变量 `DCU_VISIBLE_DEVICES`
可以通过 docker run 添加环境变量 -e DCU_VISIBLE_DEVICES 给容器添加HCU设备。
```
sh
docker run
-it
-e
DCU_VISIBLE_DEVICES
=
all ubuntu:18.04
# 添加所有HCU设备
docker run
-it
-e
DCU_VISIBLE_DEVICES
=
0 ubuntu:18.04
# 添加HCU设备0
docker run
-it
-e
DCU_VISIBLE_DEVICES
=
0,1 ubuntu:18.04
# 添加HCU设备0、1
$
docker run
-it
-e
DCU_VISIBLE_DEVICES
=
all ubuntu:18.04
# 添加所有HCU设备
$
docker run
-it
-e
DCU_VISIBLE_DEVICES
=
0 ubuntu:18.04
# 添加HCU设备0
$
docker run
-it
-e
DCU_VISIBLE_DEVICES
=
0,1 ubuntu:18.04
# 添加HCU设备0、1
```
#### 通过CDI方式
-
首先,生成CDI spec文件
...
...
@@ -82,7 +82,7 @@ c-3000.com/hcu=hcu-73873c7a6eb02041
c-3000.com/hcu
=
hcu-73873c7a6eb040a1
```
### docker rootless下对文件读写权限的限制
非root用户在使用-v挂载目录时
,保留原有权限,无法对ro目录添加w权限,执行该命令需要root
权限
非root用户在使用-v挂载目录时
可以赋予目录w权限,为了防止非root用户在容器内删除非用户目录下的文件,可以在挂载非用户目录时添加ro
权限
```
sh
$
dcu-ctk rootless
--runtime
=
docker
```
...
...
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