|
6 | 6 | major_version="${MLC_VERSION%%.*}" |
7 | 7 |
|
8 | 8 | if [[ ${major_version} -ge 7 ]]; then |
9 | | - # ROCm 7.x: Use runfile installer |
10 | | - rhel_ver="${MLC_HOST_OS_VERSION}" |
11 | | - runfile_base_url="https://repo.radeon.com/rocm/installer/rocm-runfile-installer/rocm-rel-${MLC_VERSION}/rhel/${rhel_ver}/" |
12 | | - |
13 | | - # Get the runfile name from the directory listing |
14 | | - runfile_name=$(wget -q -O - "${runfile_base_url}" | grep -oP 'rocm-installer[^"]+\.run' | head -1) |
15 | | - if [[ -z "${runfile_name}" ]]; then |
16 | | - echo "ERROR: Could not find ROCm runfile installer at ${runfile_base_url}" |
| 9 | + # ROCm 7.x: Use runfile installer (downloaded via download,file script) |
| 10 | + runfile_path="${MLC_DOWNLOAD_DOWNLOADED_PATH}" |
| 11 | + if [[ -z "${runfile_path}" || ! -f "${runfile_path}" ]]; then |
| 12 | + echo "ERROR: ROCm runfile not found at ${runfile_path}" |
17 | 13 | exit 1 |
18 | 14 | fi |
19 | 15 |
|
20 | | - echo "Downloading ROCm ${MLC_VERSION} runfile installer: ${runfile_name}" |
21 | | - wget -q "${runfile_base_url}${runfile_name}" -O /tmp/${runfile_name} |
22 | | - test $? -eq 0 || exit 1 |
23 | | - chmod +x /tmp/${runfile_name} |
| 16 | + chmod +x "${runfile_path}" |
24 | 17 |
|
25 | 18 | # Install ROCm via runfile |
26 | 19 | install_prefix="${MLC_ROCM_INSTALL_PREFIX:-/}" |
27 | 20 | echo "Installing ROCm ${MLC_VERSION} via runfile to target=${install_prefix} ..." |
28 | 21 | if [[ "${install_prefix}" == "/" ]]; then |
29 | | - sudo bash /tmp/${runfile_name} deps=install target="/" rocm postrocm |
| 22 | + sudo bash "${runfile_path}" deps=install target="/" rocm postrocm |
30 | 23 | else |
31 | | - bash /tmp/${runfile_name} deps=install target="${install_prefix}" rocm postrocm |
| 24 | + bash "${runfile_path}" deps=install target="${install_prefix}" rocm postrocm |
32 | 25 | fi |
33 | 26 | test $? -eq 0 || exit 1 |
34 | 27 |
|
35 | | - rm -f /tmp/${runfile_name} |
36 | | - |
37 | 28 | else |
38 | 29 | # ROCm 5.x/6.x: Use package manager method |
39 | 30 | mainversion="${MLC_HOST_OS_VERSION%%.*}" |
|
0 commit comments