x
This commit is contained in:
+5
-6
@@ -46,14 +46,13 @@ RUN sed -i 's|http://.*archive.ubuntu.com|http://mirrors.tuna.tsinghua.edu.cn|g'
|
||||
gpg --dearmor | tee /etc/apt/trusted.gpg.d/rocm.gpg > /dev/null && \
|
||||
echo 'deb [arch=amd64] https://repo.radeon.com/rocm/apt/7.2.1 noble main' \
|
||||
> /etc/apt/sources.list.d/rocm.list && \
|
||||
# apt pinning:AMD 仓库优先级高于 Ubuntu 自带(避免拿到旧版 rocminfo)
|
||||
printf 'Package: *\nPin: release o=repo.radeon.com\nPin-Priority: 600\n' \
|
||||
> /etc/apt/preferences.d/rocm-pin-600 && \
|
||||
apt-get update && \
|
||||
# 安装 ROCm 基础组件
|
||||
# 安装 ROCm 基础组件(apt pinning 确保从 AMD 仓库拉)
|
||||
apt-get install -y --no-install-recommends \
|
||||
rocminfo hip-dev miopen-hip && \
|
||||
# 修复 rocminfo / rocm-device-libs 版本(替换 Ubuntu 自带旧版)
|
||||
apt-get install -y --allow-downgrades \
|
||||
rocminfo=1.0.0.70201-38~24.04 \
|
||||
rocm-device-libs=1.0.0.70201-38~24.04 && \
|
||||
rocminfo rocm-device-libs hip-dev miopen-hip && \
|
||||
# 清理
|
||||
apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
||||
Reference in New Issue
Block a user