Installation prerequisites#
2024-12-17
7 min read time
Before installing ROCm, complete the following prerequisites.
Confirm the system has a supported Linux version.
To obtain the Linux distribution information, use the following command:
uname -m && cat /etc/*release
Confirm that your Linux distribution matches a supported distribution.
Example: Running the preceding command on an Ubuntu system produces the following output:
x86_64 DISTRIB_ID=Ubuntu DISTRIB_RELEASE=20.04 DISTRIB_CODENAME=focal DISTRIB_DESCRIPTION="Ubuntu 20.04.5 LTS"
Verify the kernel version.
To check the kernel version of your Linux system, type the following command:
uname -srmv
Example: The preceding command lists the kernel version in the following format:
Linux 5.15.0-46-generic #44~20.04.5-Ubuntu SMP Fri Jun 24 13:27:29 UTC 2022 x86_64
Confirm that your kernel version matches the system requirements, as listed in Supported operating systems.
Register your Enterprise Linux#
If you’re using Red Hat Enterprise Linux (RHEL) or SUSE Linux Enterprise Server (SLES), register your operating system to ensure you’re able to download and install packages.
There is no registration required for Ubuntu.
Typically you can register by following the step-by-step user interface. If you need to register by command line, use the following commands:
subscription-manager register --username <username> --password <password>
subscription-manager attach --auto
More details about registering for RHEL
Typically you can register by following the step-by-step user interface. If you need to register by command line, use the following commands:
sudo SUSEConnect -r <REGCODE>
More details about registering for SLES
Additional package repositories#
For some distributions, the ROCm installation packages depend on packages that aren’t included in the default package repositories. These external repositories need to be sourced before installation. Use the following instructions specific to your distribution to add the necessary repositories.
All ROCm installation packages are available in the default Ubuntu repositories.
Add the EPEL repository.
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm sudo rpm -ivh epel-release-latest-9.noarch.rpm
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm sudo rpm -ivh epel-release-latest-8.noarch.rpm
Enable the CodeReady Linux Builder (CRB) repository.
In order to enable CRB, you may need to install
dnf-plugin-config-manager
first.sudo dnf install dnf-plugin-config-manager sudo crb enable
Add a few modules with SUSEConnect, along with the Perl language and Education repositories.
sudo SUSEConnect -p sle-module-desktop-applications/15.6/x86_64
sudo SUSEConnect -p sle-module-development-tools/15.6/x86_64
sudo SUSEConnect -p PackageHub/15.6/x86_64
sudo zypper install zypper
sudo zypper addrepo https://download.opensuse.org/repositories/devel:/languages:/perl/15.6/devel:languages:perl.repo
sudo zypper addrepo https://download.opensuse.org/repositories/Education/15.6/Education.repo
sudo SUSEConnect -p sle-module-desktop-applications/15.5/x86_64
sudo SUSEConnect -p sle-module-development-tools/15.5/x86_64
sudo SUSEConnect -p PackageHub/15.5/x86_64
sudo zypper install zypper
sudo zypper addrepo https://download.opensuse.org/repositories/devel:/languages:/perl/15.5/devel:languages:perl.repo
sudo zypper addrepo https://download.opensuse.org/repositories/Education/15.5/Education.repo
Kernel headers and development packages#
The driver package uses Dynamic Kernel Module Support (DKMS) to build the amdgpu-dkms module (driver) for the installed kernels. This requires the Linux kernel headers and modules to be installed for each. Usually these are automatically installed with the kernel, but if you have multiple kernel versions or you have downloaded the kernel images and not the kernel meta-packages then they must be manually installed.
To install for the currently active kernel run the command corresponding to your distribution.
sudo apt install "linux-headers-$(uname -r)" "linux-modules-extra-$(uname -r)"
sudo apt install python3-setuptools python3-wheel
sudo dnf install "kernel-headers-$(uname -r)" "kernel-devel-$(uname -r)"
sudo dnf install python3-setuptools python3-wheel
sudo zypper install kernel-default-devel
sudo zypper install python3-setuptools python3-wheel
Setting permissions for groups#
This section provides steps to add any current user to a video group to access GPU resources. We recommend using the video group for all ROCm-supported operating systems.
To check the groups in your system, issue the following command:
groups
Add yourself to the
render
andvideo
group using the command:sudo usermod -a -G render,video $LOGNAME
To add all future users to the
render
andvideo
groups by default, run the following commands:echo 'ADD_EXTRA_GROUPS=1' | sudo tee -a /etc/adduser.conf echo 'EXTRA_GROUPS=video' | sudo tee -a /etc/adduser.conf echo 'EXTRA_GROUPS=render' | sudo tee -a /etc/adduser.conf
Tip
On systems with multiple users, if ROCm is installed system wide, each individual user should be added to the render
and video
groups.
Disable integrated graphics (IGP), if applicable#
ROCm doesn’t currently support integrated graphics. Should your system have an AMD IGP installed, disable it in the BIOS prior to using ROCm. If the driver can enumerate the IGP, the ROCm runtime may crash the system, even if told to omit it via HIP_VISIBLE_DEVICES.