# Installation (Linux) ## Understanding the Release-specific AMDGPU and ROCm Repositories on Linux Distributions The release-specific repositories consist of packages from a specific release of versions of AMDGPU and ROCm. The repositories are not updated for the latest packages with subsequent releases. When a new ROCm release is available, the new repository, specific to that release, is added. You can select a specific release to install, update the previously installed single version to the later available release, or add the latest version of ROCm along with the currently installed version by using the multi-version ROCm packages. ## Step by Step Instructions ::::::{tab-set} :::::{tab-item} Ubuntu :sync: ubuntu ::::{rubric} 1. Download and convert the package signing key :::: ```shell # 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 ``` ```{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. The current `rocm.gpg.key` is not available in a standard key ring distribution but has the following SHA1 sum hash: `73f5d8100de6048aa38a8b84cd9a87f05177d208 rocm.gpg.key` ``` ::::{rubric} 2. Add the AMDGPU Repository and Install the Kernel-mode Driver :::: ```{tip} If you have a version of the kernel-mode driver installed, you may skip this section. ``` To add the AMDGPU repository, follow these steps: ::::{tab-set} :::{tab-item} Ubuntu 20.04 :sync: ubuntu-20.04 ```shell # version ver=5.6.1 # amdgpu repository for focal echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/rocm.gpg] https://repo.radeon.com/amdgpu/$ver/ubuntu focal main" \ | sudo tee /etc/apt/sources.list.d/amdgpu.list sudo apt update ``` ::: :::{tab-item} Ubuntu 22.04 :sync: ubuntu-22.04 ```shell # version ver=5.6.1 # amdgpu repository for jammy echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/rocm.gpg] https://repo.radeon.com/amdgpu/$ver/ubuntu jammy main" \ | sudo tee /etc/apt/sources.list.d/amdgpu.list sudo apt update ``` ::: :::: Install the kernel mode driver and reboot the system using the following commands: ```shell sudo apt install amdgpu-dkms sudo reboot ``` ::::{rubric} 3. Add the ROCm Repository :::: To add the ROCm repository, use the following steps: ::::{tab-set} :::{tab-item} Ubuntu 20.04 :sync: ubuntu-20.04 ```shell # ROCm repositories for focal for ver in 5.3.3 5.4.6 5.5.3 5.6.1; do echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/rocm.gpg] https://repo.radeon.com/rocm/apt/$ver focal main" \ | sudo tee --append /etc/apt/sources.list.d/rocm.list done echo -e 'Package: *\nPin: release o=repo.radeon.com\nPin-Priority: 600' \ | sudo tee /etc/apt/preferences.d/rocm-pin-600 sudo apt update ``` ::: :::{tab-item} Ubuntu 22.04 :sync: ubuntu-22.04 ```shell # ROCm repositories for jammy for ver in 5.3.3 5.4.6 5.5.3 5.6.1; do echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/rocm.gpg] https://repo.radeon.com/rocm/apt/$ver jammy main" \ | sudo tee --append /etc/apt/sources.list.d/rocm.list done echo -e 'Package: *\nPin: release o=repo.radeon.com\nPin-Priority: 600' \ | sudo tee /etc/apt/preferences.d/rocm-pin-600 sudo apt update ``` ::: :::: ::::{rubric} 4. Install packages :::: Install packages of your choice in a single-version ROCm install or in a multi-version ROCm install fashion. For more information on what single/multi-version installations are, refer to {ref}`installation-types`. For a comprehensive list of meta-packages, refer to {ref}`meta-package-desc`. - Sample Single-version installation ```shell sudo apt install rocm-hip-sdk ``` - Sample Multi-version installation ```shell sudo apt install rocm-hip-sdk5.6.1 rocm-hip-sdk5.5.3 ``` ::::: :::::{tab-item} Red Hat Enterprise Linux :sync: RHEL ::::{rubric} 1. Add the AMDGPU Stack Repository and Install the Kernel-mode Driver :::: ```{tip} If you have a version of the kernel-mode driver installed, you may skip this section. ``` ::::{tab-set} :::{tab-item} RHEL 8.6 :sync: RHEL-8.6 :sync: RHEL-8 ```shell # version ver=5.6.1 sudo tee /etc/yum.repos.d/amdgpu.repo <