Skip to content

Instantly share code, notes, and snippets.

@ytxmobile98
Last active March 6, 2025 15:59
Show Gist options
  • Select an option

  • Save ytxmobile98/b198a8ef4d2affd713780b16159a6618 to your computer and use it in GitHub Desktop.

Select an option

Save ytxmobile98/b198a8ef4d2affd713780b16159a6618 to your computer and use it in GitHub Desktop.
Install OpenVINO using APT on Ubuntu

Reference: https://github.com/intel/linux-npu-driver/releases/tag/v1.8.0

First we need to install the NPU drivers.

  • Ubuntu 24.04

    # 1. wget all the driver deb packages
    wget https://github.com/intel/linux-npu-driver/releases/download/v1.8.0/intel-driver-compiler-npu_1.8.0.20240916-10885588273_ubuntu24.04_amd64.deb
    wget https://github.com/intel/linux-npu-driver/releases/download/v1.8.0/intel-fw-npu_1.8.0.20240916-10885588273_ubuntu24.04_amd64.deb
    wget https://github.com/intel/linux-npu-driver/releases/download/v1.8.0/intel-level-zero-npu_1.8.0.20240916-10885588273_ubuntu24.04_amd64.deb
    
    # 2. install dependency libtbb12
    sudo apt update
    sudo apt install libtbb12
    
    # 3. install all packages
    sudo dpkg -i *.deb
    
    # 4. install level-zero
    wget https://github.com/oneapi-src/level-zero/releases/download/v1.17.6/level-zero_1.17.6+u22.04_amd64.deb
    dpkg -i level-zero*.deb
    
    # 5. reboot
    reboot
    # after reboot
    ls /dev/accel/accel0
    # should be able to see /dev/accel/accel0 if everything is OK

Then We need to enable user access to the NPU devices:

  1. Configure the render group:

    # set the render group for accel device
    sudo chown root:render /dev/accel/accel0
    sudo chmod g+rw /dev/accel/accel0
    # add user to the render group
    sudo usermod -a -G render <user-name>
    # user needs to restart the session to use the new group (log out and log in)
  2. Configure udev rules:

    sudo bash -c "echo 'SUBSYSTEM==\"accel\", KERNEL==\"accel*\", GROUP=\"render\", MODE=\"0660\"' > /etc/udev/rules.d/10-intel-vpu.rules"
    sudo udevadm control --reload-rules
    sudo udevadm trigger --subsystem-match=accel

Reference: https://docs.openvino.ai/2024/get-started/install-openvino/install-openvino-apt.html

Note: Since the apt-key add command is deprecated, the commands below provide an alternative way to add the GPG key and APT source.

  1. Get the public key file

    wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
  2. Generate the GPG key

    sudo gpg --output /etc/apt/trusted.gpg.d/intel.gpg --dearmor GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
  3. Add the APT source

    echo "deb https://apt.repos.intel.com/openvino/2024 ubuntu24 main" | sudo tee /etc/apt/sources.list.d/intel-openvino-2024.list
  4. Update APT cache

    sudo apt update
  5. Install OpenVINO

    sudo apt install openvino
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment