Files
ROCm/docs/deploy/linux/quick_start.md.jinja
2023-10-16 09:35:17 -06:00

163 lines
4.2 KiB
Django/Jinja

{%- import "deploy/linux/linux.template.jinja" as linux %}
<!-- markdownlint-disable no-duplicate-header blanks-around-headings no-multiple-blanks -->
# Quick Start (Linux)
:::{note}
See {doc}`Radeon Software for Linux installation instructions <radeon:docs/install/install-radeon>`
for those using select RDNA™ 3 GPU with graphical applications and ROCm.
:::
## Add Repositories
{% set family = linux.supported_family[0] %}
{%- call(os) linux.for_os_in(linux.supported_os) %}
{%- if os.tag == "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
```
::::{rubric} 2. Add the repositories
::::
{%- call(version) linux.for_version_in(os) %}
```{important}
Instructions for {{ family.name }}, {{ os.name }} {{ version.number }}
```
```shell
# Kernel driver repository for {{ version.release }}
sudo tee /etc/apt/sources.list.d/amdgpu.list <<'EOF'
deb [arch=amd64 signed-by=/etc/apt/keyrings/rocm.gpg] https://repo.radeon.com/amdgpu/{{ family.amdgpu_version }}/ubuntu {{ version.release }} main
EOF
# ROCm repository for {{ version.release }}
sudo tee /etc/apt/sources.list.d/rocm.list <<'EOF'
deb [arch=amd64 signed-by=/etc/apt/keyrings/rocm.gpg] https://repo.radeon.com/rocm/apt/debian {{ version.release }} main
EOF
# Prefer packages from the rocm repository over system packages
echo -e 'Package: *\nPin: release o=repo.radeon.com\nPin-Priority: 600' | sudo tee /etc/apt/preferences.d/rocm-pin-600
```
{%- endcall %}
::::{rubric} 3. Update the list of packages
::::
```shell
sudo apt update
```
{%- elif os.tag == "rhel" %}
::::{rubric} 1. Add the repositories
::::
{%- call(version) linux.for_version_in(os) %}
```{important}
Instructions for {{ family.name }}, {{ os.name }} {{ version.number }}
```
```shell
# Add the amdgpu module repository for RHEL {{ version.number }}
sudo tee /etc/yum.repos.d/amdgpu.repo <<'EOF'
[amdgpu]
name=amdgpu
baseurl=https://repo.radeon.com/amdgpu/{{ family.amdgpu_version }}/rhel/{{ version.number }}/main/x86_64
enabled=1
gpgcheck=1
gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key
EOF
# Add the rocm repository for {{ version.release | upper }}
sudo tee /etc/yum.repos.d/rocm.repo <<'EOF'
[rocm]
name=rocm
baseurl=https://repo.radeon.com/rocm/{{ version.release }}/latest/main
enabled=1
priority=50
gpgcheck=1
gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key
EOF
```
{%- endcall %}
::::{rubric} 2. Clean cached files from enabled repositories
::::
```shell
sudo yum clean all
```
{%- elif os.tag == "sle" %}
::::{rubric} 1. Add the repositories
::::
{%- call(version) linux.for_version_in(os) %}
```{important}
Instructions for {{ family.name }}, {{ os.name }} {{ version.number }}
```
```shell
# Add the amdgpu module repository for SLES {{ version.number }}
sudo tee /etc/zypp/repos.d/amdgpu.repo <<'EOF'
[amdgpu]
name=amdgpu
baseurl=https://repo.radeon.com/amdgpu/{{ family.amdgpu_version }}/sle/{{ version.number }}/main/x86_64
enabled=1
gpgcheck=1
gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key
EOF
# Add the rocm repository for SLES
sudo tee /etc/zypp/repos.d/rocm.repo <<'EOF'
[rocm]
name=rocm
baseurl=https://repo.radeon.com/rocm/zyp/zypper
enabled=1
priority=50
gpgcheck=1
gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key
EOF
```
{%- endcall %}
::::{rubric} 2. Update the new repository
::::
```shell
sudo zypper ref
```
{%- endif %}
{%- endcall -%}
{%- call(os) linux.for_os_in(linux.supported_os) %}
## Install drivers
Install the `amdgpu-dkms` kernel module, aka driver, on your system.
{{ linux.install(os, "amdgpu-dkms")}}
{%- endcall %}
## Install ROCm runtimes
Install the `rocm-hip-libraries` meta-package. This contains dependencies for most
common ROCm applications.
{%- call(os) linux.for_os_in(linux.supported_os) %}
{{ linux.install(os, "rocm-hip-libraries")}}
{%- endcall %}
## Reboot the system
Loading the new driver requires a reboot of the system.
```shell
sudo reboot
```