Red Hat Enterprise Linux native installation#
Applies to Linux
2024-01-17
4 min read time
Register repositories#
Register kernel-mode driver#
sudo tee /etc/yum.repos.d/amdgpu.repo <<EOF
[amdgpu]
name=amdgpu
baseurl=https://repo.radeon.com/amdgpu/6.0/rhel/9.3/main/x86_64/
enabled=1
priority=50
gpgcheck=1
gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key
EOF
sudo yum clean all
sudo tee /etc/yum.repos.d/amdgpu.repo <<EOF
[amdgpu]
name=amdgpu
baseurl=https://repo.radeon.com/amdgpu/6.0/rhel/9.2/main/x86_64/
enabled=1
priority=50
gpgcheck=1
gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key
EOF
sudo yum clean all
sudo tee /etc/yum.repos.d/amdgpu.repo <<EOF
[amdgpu]
name=amdgpu
baseurl=https://repo.radeon.com/amdgpu/6.0/rhel/8.9/main/x86_64/
enabled=1
priority=50
gpgcheck=1
gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key
EOF
sudo yum clean all
sudo tee /etc/yum.repos.d/amdgpu.repo <<EOF
[amdgpu]
name=amdgpu
baseurl=https://repo.radeon.com/amdgpu/6.0/rhel/8.8/main/x86_64/
enabled=1
priority=50
gpgcheck=1
gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key
EOF
sudo yum clean all
Register ROCm packages#
sudo tee --append /etc/yum.repos.d/rocm.repo <<EOF
[ROCm-6.0]
name=ROCm6.0
baseurl=https://repo.radeon.com/rocm/rhel9/6.0/main
enabled=1
priority=50
gpgcheck=1
gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key
EOF
sudo yum clean all
sudo tee --append /etc/yum.repos.d/rocm.repo <<EOF
[ROCm-6.0]
name=ROCm6.0
baseurl=https://repo.radeon.com/rocm/rhel8/6.0/main
enabled=1
priority=50
gpgcheck=1
gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key
EOF
sudo yum clean all
Installation#
Install kernel driver#
sudo yum install amdgpu-dkms
sudo reboot
Install ROCm packages#
sudo yum install rocm
Complete the Post-installation instructions.
Upgrade#
To upgrade an existing ROCm installation to a newer version, follow the steps in Register repositories and Installation. After upgrading the kernel driver, it may also upgrade the GPU firmware which requires a system reboot to take effect.
Uninstall#
Uninstall specific meta packages#
# sudo apt autoremove <package-name>
# For example:
sudo yum remove rocm-hip-sdk
# Or for version specific packages:
sudo yum remove rocm-hip-sdk6.0
Uninstall ROCm packages#
sudo yum remove rocm-core
# Or for version specific packages:
sudo yum remove rocm-core6.0
Uninstall kernel-mode driver#
sudo yum 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 yum clean all
# Restart the system.
sudo reboot