x
This commit is contained in:
+5
-1
@@ -229,7 +229,7 @@ docker compose run --rm gradio bash
|
||||
docker run -it --rm \
|
||||
--device /dev/kfd --device /dev/dri \
|
||||
--security-opt seccomp=unconfined \
|
||||
--group-add video --group-add render \
|
||||
--group-add video \
|
||||
--ipc host \
|
||||
-v ./data/input:/data/input:ro \
|
||||
-v ./data/output:/data/output \
|
||||
@@ -393,6 +393,10 @@ ls /dev/kfd /dev/dri/render*
|
||||
3. 确认当前用户在宿主机的 `render` 和 `video` 组
|
||||
4. 容器内运行 `rocminfo` 看能否检测到 GPU
|
||||
|
||||
**Q: 启动时报 `Unable to find group render: no matching entries in group file`**
|
||||
|
||||
这是因为 Docker Compose 的 `group_add` 使用的是容器内可解析的组名,而当前 Ubuntu 镜像内不一定存在 `render` 组。Compose 默认以 root 运行容器,并已透传 `/dev/kfd` 和 `/dev/dri`,因此默认只保留 `video` 组,不再添加 `render`。如果你改为非 root 用户运行容器,再按宿主机 `/dev/dri/render*` 的实际 GID 使用数字形式添加,例如 `group_add: ["109"]`。
|
||||
|
||||
**Q: 构建时 `ninja` 被 kill(exit 137)**
|
||||
|
||||
内存不足。将 Dockerfile 中 `ninja -j4` 改为 `ninja -j2` 或 `ninja -j1`,或给 Docker 分配更多内存。
|
||||
|
||||
@@ -26,7 +26,6 @@ services:
|
||||
- seccomp=unconfined
|
||||
group_add:
|
||||
- video
|
||||
- render
|
||||
ports:
|
||||
- "10002:7860"
|
||||
environment:
|
||||
@@ -72,7 +71,6 @@ services:
|
||||
- seccomp=unconfined
|
||||
group_add:
|
||||
- video
|
||||
- render
|
||||
environment:
|
||||
- HIP_VISIBLE_DEVICES=0
|
||||
- MINERU_MODEL_SOURCE=${MINERU_MODEL_SOURCE:-huggingface}
|
||||
@@ -101,7 +99,6 @@ services:
|
||||
- seccomp=unconfined
|
||||
group_add:
|
||||
- video
|
||||
- render
|
||||
environment:
|
||||
- HIP_VISIBLE_DEVICES=1
|
||||
- MINERU_MODEL_SOURCE=${MINERU_MODEL_SOURCE:-huggingface}
|
||||
|
||||
Reference in New Issue
Block a user