Skip to content

Commit

Permalink
Fix multi-version installation instruction (#346)
Browse files Browse the repository at this point in the history
* fix multi-version installation instruction

* Update docs/install/native-install/includes/sles-multi-install.rst

Co-authored-by: Young Hui - AMD <[email protected]>

---------

Co-authored-by: Young Hui - AMD <[email protected]>
(cherry picked from commit fe89acc)
  • Loading branch information
alexxu-amd committed Nov 13, 2024
1 parent 4007a69 commit 6f401cf
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 21 deletions.
5 changes: 2 additions & 3 deletions docs/install/native-install/includes/rhel-multi-install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
.. code-block:: bash
:substitutions:
for ver in |rocm_multi_versions|; do
ver = |amdgpu_version|
sudo tee /etc/yum.repos.d/amdgpu.repo <<EOF
[amdgpu]
name=amdgpu
Expand All @@ -23,7 +23,6 @@
gpgcheck=1
gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key
EOF
done
sudo dnf clean all
{% endfor %}
Expand All @@ -44,7 +43,7 @@
for ver in |rocm_multi_versions|; do
sudo tee --append /etc/yum.repos.d/rocm.repo <<EOF
[ROCm-$ver]
name=ROCm|rocm_version|
name=ROCm$ver
baseurl=https://repo.radeon.com/rocm/el{{ os_release }}/$ver/main
enabled=1
priority=50
Expand Down
64 changes: 48 additions & 16 deletions docs/install/native-install/includes/sles-multi-install.rst
Original file line number Diff line number Diff line change
@@ -1,24 +1,56 @@
.. _sles-multi-install:

1. Register the kernel-mode driver following the steps in :ref:`sles-register-driver`.
1. Register the kernel-mode driver.

.. datatemplate:nodata::
.. tab-set::
{% for os_version in config.html_context['sles_version_numbers'] %}
{% set os_major, _ = os_version.split('.') %}
.. tab-item:: SLES {{ os_version }}
:sync: sles-{{ os_version }} sles-{{ os_major }}

.. code-block:: bash
:substitutions:
ver = |amdgpu_version|
sudo tee /etc/zypp/repos.d/amdgpu.repo <<EOF
[amdgpu]
name=amdgpu
baseurl=https://repo.radeon.com/amdgpu/$ver/sle/{{ os_version }}/main/x86_64/
enabled=1
gpgcheck=1
gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key
EOF
sudo zypper ref
{% endfor %}
.. _sles-multi-register-rocm:
2. Register ROCm packages.
.. code-block:: bash
:substitutions:
for ver in |rocm_multi_versions|; do
sudo tee --append /etc/zypp/repos.d/rocm.repo <<EOF
[ROCm-$ver]
name=ROCm$ver
baseurl=https://repo.radeon.com/rocm/zyp/$ver/main
enabled=1
gpgcheck=1
gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key
EOF
done
sudo zypper ref
.. datatemplate:nodata::
.. tab-set::
{% for os_release in config.html_context['sles_release_version_numbers'] %}
.. tab-item:: SLES {{ os_release }}
:sync: sles-{{ os_release }}
.. code-block:: bash
:substitutions:
for ver in |rocm_multi_versions|; do
sudo tee --append /etc/zypp/repos.d/rocm.repo <<EOF
[ROCm-$ver]
name=ROCm$ver
baseurl=https://repo.radeon.com/rocm/zyp/$ver/main
enabled=1
gpgcheck=1
gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key
EOF
done
sudo zypper ref
{% endfor %}
3. Install ROCm.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@
.. code-block:: bash
:substitutions:
for ver in |rocm_multi_versions|; do
ver = |amdgpu_version|
echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/rocm.gpg] https://repo.radeon.com/amdgpu/$ver/ubuntu {{ os_release }} main" \
| sudo tee /etc/apt/sources.list.d/amdgpu.list
done
sudo apt update
{% endfor %}
Expand Down

0 comments on commit 6f401cf

Please sign in to comment.