Skip to content

Commit

Permalink
Improve uninstall instructions for package manager/amdgpu-installer (…
Browse files Browse the repository at this point in the history
…old layout) (#400)

* Update NPM install for parity with amdgpu-install (#373)

* Update post-install instruction versioning (#386)

* Fix wget command and quotations ROCm runfile docs (#387)

* Change Runfile Installer run command to avoid persmission issue (#388)

* Update docs to add bash keyword when running the .run file. (#391)

* improve uninstall instructions

* fix typo

* remove space

* add reboot for RHEL

* improve consistency

---------

Co-authored-by: harkgill-amd <[email protected]>
Co-authored-by: Jeffrey Novotny <[email protected]>
Co-authored-by: pbhandar-amd <[email protected]>
Co-authored-by: Alex Xu <[email protected]>
(cherry picked from commit c068cdf)
  • Loading branch information
alexxu-amd authored and Alex Xu committed Jan 23, 2025
1 parent b5b8dd8 commit be32bdc
Show file tree
Hide file tree
Showing 6 changed files with 308 additions and 32 deletions.
113 changes: 111 additions & 2 deletions docs/install/amdgpu-install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,117 @@ Ubuntu

.. code-block:: bash
sudo apt purge amdgpu-install
sudo apt autoremove
.. code-block:: bash
sudo apt purge amdgpu-install
sudo apt autoremove
.. tab-item:: Debian
.. code-block:: bash
sudo apt purge amdgpu-install
sudo apt autoremove
.. tab-item:: RHEL
.. code-block:: bash
sudo dnf remove amdgpu-install
.. tab-item:: OL
.. code-block:: bash
sudo dnf remove amdgpu-install
.. tab-item:: SLES
.. code-block:: bash
sudo zypper remove amdgpu-install
Remove ROCm and AMDGPU repositories
=================================================

.. tab-set::

.. tab-item:: Ubuntu

.. code-block:: bash
# Remove the repositories
sudo rm /etc/apt/sources.list.d/amdgpu.list
sudo rm /etc/apt/sources.list.d/rocm.list
# Clear cache and clean system
sudo rm -rf /var/cache/apt/*
sudo apt clean all
sudo apt update
# Restart the system
sudo reboot
.. tab-item:: Debian

.. code-block:: bash
# Remove the repositories
sudo rm /etc/apt/sources.list.d/amdgpu.list
sudo rm /etc/apt/sources.list.d/rocm.list
# Clear cache and clean system
sudo rm -rf /var/cache/apt/*
sudo apt clean all
sudo apt update
# Restart the system
sudo reboot
.. tab-item:: RHEL

.. code-block:: bash
# Remove the repositories
sudo rm /etc/yum.repos.d/rocm.repo*
sudo rm /etc/yum.repos.d/amdgpu.repo*
# Clear the cache and clean the system
sudo rm -rf /var/cache/dnf
sudo dnf clean all
# Restart the system
sudo reboot
.. tab-item:: OL

.. code-block:: bash
# Remove the repositories
sudo rm /etc/yum.repos.d/rocm.repo*
sudo rm /etc/yum.repos.d/amdgpu.repo*
# Clear the cache and clean the system
sudo rm -rf /var/cache/dnf
sudo dnf clean all
# Restart the system
sudo reboot
.. tab-item:: SLES

.. code-block:: bash
# Remove the repository rpmsave files
sudo rm /etc/zypp/repos.d/rocm.repo*
sudo rm /etc/zypp/repos.d/amdgpu.repo*
# Clear cache and clean system
sudo zypper clean --all
sudo zypper refresh
# Restart the system
sudo reboot
Additional options
=================================================
Expand Down
173 changes: 173 additions & 0 deletions docs/install/native-install/debian.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
.. meta::
:description: Debian native installation
:keywords: ROCm install, installation instructions, Debian, Debian native installation, AMD, ROCm

****************************************************************************
Debian native installation
****************************************************************************

.. important::

Ensure that the :doc:`/install/prerequisites` are met before installing.

.. _debian-register-repo:

Registering ROCm repositories
=================================================

.. _debian-package-key:

Package signing key
---------------------------------------------------------------------------

Download and convert the package signing key.

.. code-block:: bash
# Make the directory if it doesn't exist yet.
# This location is recommended by the distribution maintainers.
sudo mkdir --parents --mode=0755 /etc/apt/keyrings
# Download the key, convert the signing-key to a full
# keyring required by apt and store in the keyring directory
wget https://repo.radeon.com/rocm/rocm.gpg.key -O - | \
gpg --dearmor | sudo tee /etc/apt/keyrings/rocm.gpg > /dev/null
.. _debian-register-driver:

.. note::

The GPG key may change; ensure it is updated when installing a new release.
If the key signature verification fails while updating,
re-add the key from the ROCm to the apt repository as mentioned above.

Register kernel-mode driver
---------------------------------------------------------------------------

Add the AMDGPU repository for the driver.

.. datatemplate:nodata::
.. tab-set::
{% for (os_version, os_release) in config.html_context['debian_version_numbers'] %}
.. tab-item:: Debian {{ os_version }}
:sync: debian-{{ os_version}}

.. code-block:: bash
:substitutions:
echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/rocm.gpg] https://repo.radeon.com/amdgpu/|rocm_version|/ubuntu {{ os_release }} main" \
| sudo tee /etc/apt/sources.list.d/amdgpu.list
sudo apt update
{% endfor %}

.. _debian-register-rocm:

Register ROCm packages
---------------------------------------------------------------------------

Add the ROCm repository.

.. datatemplate:nodata::
.. tab-set::
{% for (os_version, os_release) in config.html_context['debian_version_numbers'] %}
.. tab-item:: Debian {{ os_version }}
:sync: debian-{{ os_version}}

.. code-block:: bash
:substitutions:
echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/rocm.gpg] https://repo.radeon.com/rocm/apt/|rocm_version| {{ os_release }} main" \
| sudo tee --append /etc/apt/sources.list.d/rocm.list
echo -e 'Package: *\nPin: release o=repo.radeon.com\nPin-Priority: 600' \
| sudo tee /etc/apt/preferences.d/rocm-pin-600
sudo apt update
{% endfor %}

.. _debian-install:

Installing
================================================

Install kernel driver
---------------------------------------------------------------------------

.. code-block:: bash
sudo apt install amdgpu-dkms
sudo reboot
Install ROCm packages
---------------------------------------------------------------------------

.. code-block:: bash
sudo apt install rocm
Complete the :doc:`../post-install`.


.. _debian-upgrade:

Upgrading
================================================

To upgrade an existing ROCm installation to a newer version, follow the steps in
:ref:`debian-register-repo` and :ref:`debian-install`.

.. note::

Upgrading the kernel driver may also upgrade the GPU firmware, which requires a
system reboot to take effect.

.. _debian-uninstall:

Uninstalling
================================================

Uninstall specific meta packages
---------------------------------------------------------------------------

.. code-block:: bash
:substitutions:
# sudo apt autoremove <package-name>
# For example:
sudo apt autoremove rocm
# Or for version specific packages:
sudo apt autoremove rocm|rocm_version|
Uninstall ROCm packages
---------------------------------------------------------------------------

.. code-block:: bash
:substitutions:
sudo apt autoremove rocm-core
# Or for version specific packages:
sudo apt autoremove rocm-core|rocm_version|
Uninstall kernel-mode driver
---------------------------------------------------------------------------

.. code-block:: bash
sudo apt autoremove amdgpu-dkms
Remove ROCm and AMDGPU repositories
---------------------------------------------------------------------------

.. code-block:: bash
# Remove the repositories
sudo rm /etc/apt/sources.list.d/rocm.list
sudo rm /etc/apt/sources.list.d/amdgpu.list
# Clear the cache and clean the system
sudo rm -rf /var/cache/apt/*
sudo apt clean all
sudo apt update
# Restart the system
sudo reboot
14 changes: 7 additions & 7 deletions docs/install/native-install/ol.rst
Original file line number Diff line number Diff line change
Expand Up @@ -136,21 +136,21 @@ Uninstall kernel-mode driver
.. code-block:: bash
sudo dnf remove amdgpu-dkms
sudo dnf remove amdgpu-dkms amdgpu-core
Remove ROCm and AMDGPU repositories
---------------------------------------------------------------------------
.. code-block:: bash
# Remove the repositories.
sudo rm /etc/yum.repos.d/rocm.list
sudo rm /etc/yum.repos.d/amdgpu.list
# Remove the repositories
sudo rm /etc/yum.repos.d/rocm.repo*
sudo rm /etc/yum.repos.d/amdgpu.repo*
# Clear the cache and clean the system.
sudo rm -rf /var/cache/yum
# Clear the cache and clean the system
sudo rm -rf /var/cache/dnf
sudo dnf clean all
# Restart the system.
# Restart the system
sudo reboot
14 changes: 7 additions & 7 deletions docs/install/native-install/rhel.rst
Original file line number Diff line number Diff line change
Expand Up @@ -136,20 +136,20 @@ Uninstall kernel-mode driver
.. code-block:: bash
sudo dnf remove amdgpu-dkms
sudo dnf remove amdgpu-dkms amdgpu-core
Remove ROCm and AMDGPU repositories
---------------------------------------------------------------------------
.. code-block:: bash
# Remove the repositories.
sudo rm /etc/yum.repos.d/rocm.list
sudo rm /etc/yum.repos.d/amdgpu.list
# Remove the repositories
sudo rm /etc/yum.repos.d/rocm.repo*
sudo rm /etc/yum.repos.d/amdgpu.repo*
# Clear the cache and clean the system.
sudo rm -rf /var/cache/yum
# Clear the cache and clean the system
sudo rm -rf /var/cache/dnf
sudo dnf clean all
# Restart the system.
# Restart the system
sudo reboot
20 changes: 7 additions & 13 deletions docs/install/native-install/sles.rst
Original file line number Diff line number Diff line change
Expand Up @@ -130,28 +130,22 @@ Uninstall kernel-mode driver
.. code-block:: bash
sudo zypper remove --clean-deps amdgpu-dkms
sudo zypper remove amdgpu-dkms amdgpu-core
Remove ROCm and AMDGPU repositories
---------------------------------------------------------------------------
.. code-block:: bash
:substitutions:
# Remove the repositories.
# sudo zypper removerepo <rocm*/amdgpu>
#
# The name of the repositories can be listed with:
sudo zypper repos
# Remove the 'ROCm' and 'amdgpu' repositories
sudo zypper removerepo "ROCm-|rocm_version|"
sudo zypper removerepo "amdgpu"
# Then remove the 'ROCm' and 'amdgpu' repositories.
# For example:
sudo zypper removerepo ROCm-|rocm_version|
sudo zypper removerepo amdgpu
# Clear the cache and clean the system.
# Clear the cache and clean the system
sudo zypper clean --all
sudo zypper refresh
# Restart the system.
# Restart the system
sudo reboot
Loading

0 comments on commit be32bdc

Please sign in to comment.