Installing Packages from the Intel Repository

The Ubuntu 22.04 repositories do not contain compute packages for various Intel graphics products. To install these packages, you can use Intel’s dedicated package repository.

Prerequisites

Make sure you use Ubuntu 22.04.

Installation procedure

  1. Install the Intel graphics GPG public key.

    wget -qO - https://repositories.intel.com/gpu/intel-graphics.key | \
    sudo gpg --yes --dearmor --output /usr/share/keyrings/intel-graphics.gpg
    
  2. Configure the repositories.intel.com package repository.

    echo "deb [arch=amd64,i386 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/gpu/ubuntu jammy unified" | \
    sudo tee /etc/apt/sources.list.d/intel-gpu-jammy.list
    
  3. Update the package repository metadata.

    sudo apt update
    
  4. Install the compute-related packages.

    sudo apt-get install -y libze-intel-gpu1 libze1 intel-opencl-icd clinfo
    

The commands listed above install all the essential packages needed for most users, aiming to minimize the installation of unnecessary packages. However, if you plan to use PyTorch, install libze-dev and intel-ocloc additionally:

sudo apt-get install -y libze-dev intel-ocloc

If you wish to enable hardware ray tracing support, install intel-level-zero-gpu-raytracing additionally:

sudo apt-get install -y intel-level-zero-gpu-raytracing

Verifying installation

To verify that the kernel and compute drivers are installed and functional, run clinfo:

clinfo | grep "Device Name"

You should see the Intel graphics product device names listed. If they do not appear, ensure you have permissions to access /dev/dri/renderD*. This typically requires your user to be in the render group:

sudo gpasswd -a ${USER} render
newgrp render

Alternatively, you can run the clinfo command as root.