4.4. Installing OpenVINO™ Toolkit
- Install the required OpenVINO™ Toolkit components.
- 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
- Red Hat* Enterprise Linux* 8: Python 3.8.
- Ubuntu* 20: Python 3.8.
- Ubuntu* 22: Python 3.10.
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.
- [RHEL 8 and Ubuntu 20 only] Create a Python 3.8 virtual environment and start it:
Important: This step is not required on Ubuntu* 22.04. If you use Ubuntu* 22.04, skip to the next step where you install the OpenVINO™ 2023.3 Runtime.
- Install Python 3.8:
Red Hat* Enterprise Linux* :
sudo yum install python3.8
Ubuntu* Linux* 20:sudo apt update sudo apt install python3.8 python3.8-venv -y
- Verify your Python installation with the following command:
python3.8 -V
This command should return output indicating that you are using Python 3.8. For example:
Python 3.8.16
- Create a new directory and switch to it:
mkdir ~/build-openvino-dev && cd ~/build-openvino-dev
- Create a Python 3.8 virtual environment:
python3.8 -m venv openvino_env source openvino_env/bin/activate
- Confirm that you are in the new Python virtual environment:
python -V
This command should return output indicating that you are using Python 3.8. For example:
Python 3.8.5
- Install Python 3.8:
- Install the OpenVINO™ 2023.3 Runtime:
- If you do not have an opt/intel folder, create one as follows:
sudo mkdir /opt/intel
- If you do not have a ~/Downloads folder, create one as follows:
mkdir ~/Downloads
- Go to your Downloads folder:
cd ~/Downloads
- Download the OpenVINO™ 2023.3 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/2023.3/linux/\ l_openvino_toolkit_rhel8_2023.3.0.13775.ceeafaf64f3_x86_64.tgz \ --output openvino_2023.3.0.tgz tar -xf openvino_2023.3.0.tgz sudo mv \ l_openvino_toolkit_rhel8_2023.3.0.13775.ceeafaf64f3_x86_64 \ /opt/intel/openvino_2023.3.0
- Ubuntu* 20:
curl -L https://storage.openvinotoolkit.org/\ repositories/openvino/packages/2023.3/linux/\ l_openvino_toolkit_ubuntu20_2023.3.0.13775.ceeafaf64f3_x86_64.tgz \ --output openvino_2023.3.0.tgz tar -xf openvino_2023.3.0.tgz sudo mv \ l_openvino_toolkit_ubuntu20_2023.3.0.13775.ceeafaf64f3_x86_64 \ /opt/intel/openvino_2023.3.0
- Ubuntu* 22:
curl -L https://storage.openvinotoolkit.org/\ repositories/openvino/packages/2023.3/linux/\ l_openvino_toolkit_ubuntu22_2023.3.0.13775.ceeafaf64f3_x86_64.tgz \ --output openvino_2023.3.0.tgz tar -xf openvino_2023.3.0.tgz sudo mv \ l_openvino_toolkit_ubuntu22_2023.3.0.13775.ceeafaf64f3_x86_64 \ /opt/intel/openvino_2023.3.0
- Red Hat* Enterprise Linux* 8:
- Install system dependencies required by the OpenVINO™ Runtime by running the provided script:
- Red Hat* Enterprise Linux* :
cd /opt/intel/openvino_2023.3.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" "\${pkgs\[@\]}"/yum \ install \${iopt:+\$iopt} "\${pkgs[@]}"/' \ ./install_openvino_dependencies.sh sudo -E ./install_openvino_dependencies.sh
- Ubuntu* Linux* :
cd /opt/intel/openvino_2023.3.0/install_dependencies/ sudo -E ./install_openvino_dependencies.sh
- Red Hat* Enterprise Linux* :
- Create a symbolic link:
cd /opt/intel sudo ln -s openvino_2023.3.0 openvino_2023
Important: If you have already installed a previous release of OpenVINO™ 2023, a symbolic link to the openvino_2023 folder might already exist. Unlink the previous link with the sudo unlink openvino_2023 command, and then re-run the commands in this step. - Configure the OpenVINO™ Runtime environment variables with the following command:
source /opt/intel/openvino_2023/setupvars.sh
- If you do not have an opt/intel folder, create one as follows:
- Install the OpenVINO™ Development Tools:
- Upgrade the Python pip command:
python -m pip install --upgrade pip
- Install the openvino-dev package:
pip install "openvino-dev[<frameworks>]==2023.3.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]==2023.3.0"
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
Thjs 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.
- Upgrade the Python pip command:
- 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
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 .
- 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:
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.
source ~/build-openvino-dev/openvino_env/bin/activate
unset python_version
source <openvino_installdir>/openvino_2023/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.