6
DeepSeek
关于docker容器内rocminfo无法正常使用的问题
2025-08-06 14:53:04
154

我现在在宿主机上面安装的驱动和DTK版本分别是rock-6.3.13-V1.12.0.run和DTK-25.04.1-Ubuntu22.04-x86_64.tar.gz
然后我使用https://forum.sourcefind.cn/thread/822这个社区文档里面提供的镜像文件,然后发现进入容器之后rocminfo和rocm-smi都有报错

root@2bb11cb833e7:/opt/rocm/bin# /opt/rocm/bin/rocminfo
C-3000 hycu module is loaded
hsa api call failure at: /data/jenkins_workspace/workspace/galaxy_release/galaxy/rocminfo/rocminfo.cc:1230
Call returned HSA_STATUS_ERROR_OUT_OF_RESOURCES: The runtime failed to allocate the necessary resources. This error may also occur when the core runtime library needs to spawn threads or create internal OS-specific events.


root@82c36d14681e:/# hy-smi

============================ System Management Interface =============================

Error: Get power failed: RSMI_STATUS_NOT_SUPPORTED: This function is not supported in the current environment.
Error: Get power failed: RSMI_STATUS_NOT_SUPPORTED: This function is not supported in the current environment.
DCU Temp AvgPwr Perf PwrCap VRAM% DCU% Mode
0 N/A N/A auto N/A 0% 0% N/A
1 N/A N/A auto N/A 0% 0% N/A

=================================== End of SMI Log ===================================

然后就导致使用ollama启动的时候无法找到dcu,只能以cpu模式启动
那这个原因是不是因为驱动和镜像文件的DTK版本不兼容或者不匹配的原因
我现在重新拉取了一个pytorch镜像docker pull image.sourcefind.cn:5000/dcu/admin/base/pytorch:2.4.1-ubuntu22.04-dtk25.04.1-py3.10
是否可以解决这个问题

全部评论(3)
只看楼主
T
tianlh
2楼

启动容器的指令是什么?可以参考以下参数

docker run -it --name=test --network=host --group-add=video --ipc=host --cap-add=SYS_PTRACE --security-opt seccomp=unconfined --device /dev/kfd --device /dev/dri --device /dev/mkfd -v /opt/hyhal:/opt/hyhal:ro image_id /bin/bash
2025/8/7
网
网友Dbys6b
楼主
1楼
另外ollama版本除了https://forum.sourcefind.cn/thread/822这个文档内的版本,还可以使用其他的版本吗?我使用了ollama0.9.5和ollama0.10.1的版本进行源码编译都不行,启动ollama之后检测不到dcu
2025/8/6
T
tianlh
回复 @网友Dbys6b

没有其他版本

2025/8/7
没有更多内容了
--
楼主
Level.1
0 帖子
楼主热帖
暂无数据