Red Hat Enterprise Linux native installation#
Applies to Linux
2024-10-03
5 min read time
Important
Make sure that the Installation prerequisites are met before installing.
Registering ROCm repositories#
Register kernel-mode driver#
sudo tee /etc/yum.repos.d/amdgpu.repo <<EOF
[amdgpu]
name=amdgpu
baseurl=https://repo.radeon.com/amdgpu/6.2.1/el/9.4/main/x86_64/
enabled=1
priority=50
gpgcheck=1
gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key
EOF
sudo dnf clean all
sudo tee /etc/yum.repos.d/amdgpu.repo <<EOF
[amdgpu]
name=amdgpu
baseurl=https://repo.radeon.com/amdgpu/6.2.1/el/9.3/main/x86_64/
enabled=1
priority=50
gpgcheck=1
gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key
EOF
sudo dnf clean all
sudo tee /etc/yum.repos.d/amdgpu.repo <<EOF
[amdgpu]
name=amdgpu
baseurl=https://repo.radeon.com/amdgpu/6.2.1/el/8.10/main/x86_64/
enabled=1
priority=50
gpgcheck=1
gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key
EOF
sudo dnf clean all
sudo tee /etc/yum.repos.d/amdgpu.repo <<EOF
[amdgpu]
name=amdgpu
baseurl=https://repo.radeon.com/amdgpu/6.2.1/el/8.9/main/x86_64/
enabled=1
priority=50
gpgcheck=1
gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key
EOF
sudo dnf clean all
Register ROCm packages#
sudo tee --append /etc/yum.repos.d/rocm.repo <<EOF
[ROCm-6.2.1]
name=ROCm6.2.1
baseurl=https://repo.radeon.com/rocm/el9/6.2.1/main
enabled=1
priority=50
gpgcheck=1
gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key
EOF
sudo dnf clean all
sudo tee --append /etc/yum.repos.d/rocm.repo <<EOF
[ROCm-6.2.1]
name=ROCm6.2.1
baseurl=https://repo.radeon.com/rocm/el8/6.2.1/main
enabled=1
priority=50
gpgcheck=1
gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key
EOF
sudo dnf clean all
Installing#
Install kernel driver#
sudo dnf install amdgpu-dkms
sudo reboot
Install ROCm packages#
sudo dnf install rocm
Complete the Post-installation instructions.
Upgrading#
To upgrade an existing ROCm installation to a newer version, follow the steps in Registering ROCm repositories and Installing.
Note
Upgrading the kernel driver may also upgrade the GPU firmware, which requires a system reboot to take effect.
Uninstalling#
Uninstall specific meta packages#
# sudo apt autoremove <package-name>
# For example:
sudo dnf remove rocm
# Or for version specific packages:
sudo dnf remove rocm6.2.1
Uninstall ROCm packages#
sudo dnf remove rocm-core
# Or for version specific packages:
sudo dnf remove rocm-core6.2.1
Uninstall kernel-mode driver#
sudo dnf remove amdgpu-dkms
Remove ROCm and AMDGPU repositories#
# Remove the repositories.
sudo rm /etc/yum.repos.d/rocm.list
sudo rm /etc/yum.repos.d/amdgpu.list
# Clear the cache and clean the system.
sudo rm -rf /var/cache/yum
sudo dnf clean all
# Restart the system.
sudo reboot