FPGA AI Suite: Getting Started Guide

ID 768970
Date 4/21/2025
Public
Document Table of Contents

4.4. Installing OpenVINO™ Toolkit

The FPGA AI Suite requires the OpenVINO™ Toolkit 2024.6 for Linux.
To prepare OpenVINO™ Toolkit for FPGA AI Suite:
  1. Install the required OpenVINO™ Toolkit components.
  2. Configure your OpenVINO™ environment.

    You must configure the OpenVINO™ environment each time you want to use the OpenVINO™ Toolkit. For convenience, you can add the configuration to your .bashrc file.

The installer might issue an error message that indicates the OpenCL is not installed and is needed for GPU operation of OpenVINO™ . You can safely ignore this error message. The FPGA AI Suite does not require OpenVINO™ GPU support.

Recommended Python Version

OpenVINO™ Toolkit supports Python versions 3.9-3.12. The recommended version for your operating system is as follows:
  • Red Hat* Enterprise Linux* 8.7: Python 3.9.
  • Red Hat* Enterprise Linux* 8.10: Python 3.12.
  • Ubuntu* 20: Python 3.12.
  • Ubuntu* 22: Python 3.12.

Installing Required OpenVINO™ Toolkit Components

FPGA AI Suite requires you to install the OpenVINO™ Runtime and OpenVINO™ Development Tools separately.

If you plan run the FPGA AI Suite in a WSL 2 environment, ensure that you complete these instructions from an Ubuntu* command prompt in your WSL 2 environment and not from a Windows* command line.

The location where you install the OpenVINO™ Runtime is often referred to as <openvino_installdir> in FPGA AI Suite documentation. Typically, this location is /opt/intel or /home/<user>/intel.

To install the required OpenVINO™ Toolkit components:
  1. Create a Python virtual environment and start it:
    1. Install Python:
      Red Hat* Enterprise Linux* 8.7 :
      sudo yum install python3.9
      Red Hat* Enterprise Linux* 8.10 :
      sudo yum install python3.12
      Ubuntu* Linux* 20:
      sudo apt update && sudo apt upgrade -y
      
      sudo http_proxy=<add_proxy> add-apt-repository ppa:deadsnakes/ppa -y
      
      sudo apt update
      
      sudo apt install python3.12 python3.12-venv -y
      
      Ubuntu* Linux* 22:
      sudo apt update && sudo apt upgrade -y
      
      sudo http_proxy=<add_proxy> add-apt-repository ppa:deadsnakes/ppa -y
      
      sudo apt update
      
      sudo apt install python3.12 python3.12-venv -y
    2. Verify your Python installation with the following command:
      Red Hat* Enterprise Linux* 8.7 :
      python3.9 -V
      Red Hat* Enterprise Linux* 8.10 :
      python3.12 -V
      Ubuntu* Linux* 20:
      python3.12 -V
      Ubuntu* Linux* 22:
      python3.12 -V

      This command should return output indicating the version that you are using. For example:

      Python 3.12.10

    3. Create a new directory and switch to it:
      mkdir ~/build-openvino-dev && cd ~/build-openvino-dev
    4. Create a Python virtual environment:
      Red Hat* Enterprise Linux* 8.7 :
      python3.9 -m venv openvino_env
      
      source openvino_env/bin/activate
      Red Hat* Enterprise Linux* 8.10 :
      python3.12 -m venv openvino_env
      
      source openvino_env/bin/activate
      Ubuntu* Linux* 20 :
      python3.12 -m venv openvino_env
      
      source openvino_env/bin/activate
      Ubuntu* Linux* 22 :
      python3.12 -m venv openvino_env
      
      source openvino_env/bin/activate
    5. Confirm that you are in the new Python virtual environment:
      python -V

      This command should return output indicating the version that you are using.. For example:

      Python 3.12.10

  2. Install the OpenVINO™ 2024.6 Runtime:
    1. If you do not have an opt/intel folder, create one as follows:
      sudo mkdir /opt/intel
    2. If you do not have a ~/Downloads folder, create one as follows:
      mkdir ~/Downloads
    3. Go to your Downloads folder:
      cd ~/Downloads
    4. Download the OpenVINO™ 2024.6 Runtime archive file for your system, extract the files, and move them to the /opt/intel folder as follows:
      • Red Hat* Enterprise Linux* 8:
        curl -L https://storage.openvinotoolkit.org/\
        repositories/openvino/packages/2024.6/linux/\
        l_openvino_toolkit_rhel8_2024.6.0.17404.4c0f47d2335_x86_64.tgz \
        --output openvino_2024.6.0.tgz
        
        tar -xf openvino_2024.6.0.tgz
        
        sudo mv \
        l_openvino_toolkit_rhel8_2024.6.0.17404.4c0f47d2335_x86_64 \
        /opt/intel/openvino_2024.6.0
      • Ubuntu* 20:
        curl -L https://storage.openvinotoolkit.org/\
        repositories/openvino/packages/2024.6/linux/\
        l_openvino_toolkit_ubuntu20_2024.6.0.17404.4c0f47d2335_x86_64.tgz \
        --output openvino_2024.6.0.tgz
        
        tar -xf openvino_2024.6.0.tgz
        
        sudo mv \
        l_openvino_toolkit_ubuntu20_2024.6.0.17404.4c0f47d2335_x86_64 \
        /opt/intel/openvino_2024.6.0
      • Ubuntu* 22:
        curl -L https://storage.openvinotoolkit.org/\
        repositories/openvino/packages/2024.6/linux/\
        l_openvino_toolkit_ubuntu22_2024.6.0.17404.4c0f47d2335_x86_64.tgz \
        --output openvino_2024.6.0.tgz
        
        tar -xf openvino_2024.6.0.tgz
        
        sudo mv \
        l_openvino_toolkit_ubuntu22_2024.6.0.17404.4c0f47d2335_x86_64 \
        /opt/intel/openvino_2024.6.0
    5. Install system dependencies required by the OpenVINO™ Runtime by running the provided script:
      • Red Hat* Enterprise Linux* :
        cd /opt/intel/openvino_2024.6.0/install_dependencies/
        
        sed -i -e 's|http://mirror.centos.org/centos/8-stream/AppStream|' \
        'https://repo.almalinux.org/almalinux/8/AppStream|' \
        ./install_openvino_dependencies.sh
        
        sed -i -e 's|yum install "\$iopt"|' \
        'yum install \${iopt:+\$iopt}|' \
        ./install_openvino_dependencies.sh
        
        sudo -E ./install_openvino_dependencies.sh
      • Ubuntu* Linux* :
        cd /opt/intel/openvino_2024.6.0/install_dependencies/
        
        sudo -E ./install_openvino_dependencies.sh
    6. Create a symbolic link:
      cd /opt/intel
      
      sudo ln -s openvino_2024.6.0 openvino_2024
      Important: If you have already installed a previous release of OpenVINO™ 2024, a symbolic link to the openvino_2024 folder might already exist. Unlink the previous link with the sudo unlink openvino_2024 command, and then re-run the commands in this step.
    7. Configure the OpenVINO™ Runtime environment variables with the following command:
      source /opt/intel/openvino_2024/setupvars.sh
  3. Install the OpenVINO™ Development Tools:
    1. Upgrade the Python pip command:
      python -m pip install --upgrade pip
    2. Install the openvino-dev package:
      pip install "openvino-dev[<frameworks>]==2024.6.0"

      Where <frameworks> is a comma-separated list of the deep learning frameworks that you want your OpenVINO™ development tools to support. The following values are supported: caffe, kaldi, mxnet, onnx, pytorch, tensorflow, tensorflow2.

      For example, to install the OpenVINO™ development tools to support the Caffe, PyTorch*, and TensorFlow* frameworks, run the following command:
      pip install "openvino-dev[caffe, pytorch, tensorflow]==2024.6.0"
      Restriction: PyTorch 2.6.0 is not supported by the OpenVINO™ 2024.6.0 Open Model Zoo tools. Change your installed PyTorch version to 2.5.1 with the following commands:
      pip freeze | grep torch
      
      pip uninstall torch==2.6.0 torchvision==0.21.0
      
      pip install torch==2.5.1 torchvision==0.20.1 \
          --index-url https://download.pytorch.org/whl/cu118
      Tip: This command might produce the following error message:
      ERROR: tensorflow 2.13.1 has requirement numpy<=1.24.3,>=1.22, but you'll have numpy 1.24.4 which is incompatible
      This error message is pip-specific indicating that some packages in the local Python environment do not conform to OpenVINO™ development tools requirements. You can safely ignore this warning message. The openvino-dev package is still successfully installed.
  4. Install OpenCV as follows:
    • On Red Hat* Enterprise Linux* systems, OpenCV is available from the CodeReady Linux Builder repository. Enable the repository and install OpenCV with the following commands:
      sudo subscription-manager repos \
      --enable codeready-builder-for-rhel-8-x86_64-rpms
      
      sudo yum update
      
      sudo yum install opencv opencv-devel
      
      pip3 install opencv-python
    • On Ubuntu* Linux systems, OpenCV is available in the default repositories. Install OpenCV with the following commands:
      sudo apt update
      
      sudo apt install libopencv-dev python3-opencv
      
      pip install opencv-python

    If you need a version of OpenCV optimized for your hardware, you might need to build OpenCV from source. For instructions, refer to "Approach #2: Build OpenCV against specific version of OpenVINO™ " section of OpenCV usage with OpenVINO .

Configuring the OpenVINO™ Environment

You must configure the OpenVINO™ environment each time you want to use the OpenVINO™ Toolkit. For convenience, you can add the configuration to your .bashrc file.

To configure the OpenVINO™ environment, start a Linux terminal session and run the following commands:
source ~/build-openvino-dev/openvino_env/bin/activate

unset python_version

source <openvino_installdir>/openvino_2024/setupvars.sh

You can add these comments to your .bashrc file to configure the OpenVINO™ environment for you automatically when you log on.

Next Step

After installing OpenVINO™ toolkit, continue your installation with the steps in Installing Quartus Prime Pro Edition Software.