Skip to content

Instantly share code, notes, and snippets.

@goldshadow0731
Last active April 10, 2024 03:53
Show Gist options
  • Save goldshadow0731/78c0193c2bd6f16dda7f0be08dbcd6c1 to your computer and use it in GitHub Desktop.
Save goldshadow0731/78c0193c2bd6f16dda7f0be08dbcd6c1 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Reference: https://docs.openvino.ai/2022.3/home.html
# System Requirements
# Raspberry Pi OS (Debian Bullseye)
# - Python 3.9.2
sudo apt update
sudo apt install -y wget tar python3-pip
# ==================================================
# Step 1: Download and Install OpenVINO Runtime
# ==================================================
# Create an installation folder for OpenVINO.
sudo mkdir -p /opt/intel
# Go to your ~/Downloads directory and download OpenVINO Runtime archive file for Debian from the OpenVINO package repository.
cd ~/Downloads/
wget -O openvino_2022.3.1.tgz https://storage.openvinotoolkit.org/repositories/openvino/packages/2022.3.1/linux/l_openvino_toolkit_debian9_2022.3.1.9227.cf2c7da5689_arm64.tgz
# Extract the archive file and move it to the installation folder:
tar -zxf openvino_2022.3.1.tgz && rm openvino_2022.3.1.tgz
sudo mv l_openvino_toolkit_debian9_2022.3.1.9227.cf2c7da5689_arm64 /opt/intel/openvino_2022.3.1
# Install required system dependencies on Linux. To do this, OpenVINO provides a script in the extracted installation directory. Run the following command:
cd /opt/intel/openvino_2022.3.1
sudo -E ./install_dependencies/install_openvino_dependencies.sh
# (Optional) Install numpy Python Library:
pip3 install -r ./python/python3.9/requirements.txt
# For simplicity, it is useful to create a symbolic link as below:
cd /opt/intel
sudo ln -s openvino_2022.3.1 openvino_2022
# ==================================================
# Step 2: Install External Software Dependencies
# ==================================================
# CMake version 3.10 or higher is required for building the OpenVINO™ toolkit sample application.
# To install, open a Terminal window and run the following command:
sudo apt update
sudo apt install -y cmake
# ==================================================
# Step 3: Set the Environment Variables
# ==================================================
echo "source /opt/intel/openvino_2022/setupvars.sh" >> ~/.bashrc
source /opt/intel/openvino_2022/setupvars.sh
# ==================================================
# Step 4 (Optional): Install Additional Components
# ==================================================
# Install OpenVINO Development Toolkit
# PASS
# ==================================================
# Step 5 (Optional): Add USB Rules for an Intel® Neural Compute Stick 2 device
# ==================================================
# Add the current Linux user to the users group:
sudo usermod -a -G users "$(whoami)"
# Go to the install_dependencies directory:
cd /opt/intel/openvino_2022/install_dependencies/
# Copy the 97-myriad-usbboot.rules file to the udev rules directory:
sudo cp 97-myriad-usbboot.rules /etc/udev/rules.d/
# Now reload udev rules with rules that you copied
sudo udevadm control --reload-rules
sudo udevadm trigger
sudo ldconfig
# You may need to reboot your machine for this to take effect.
echo "============================================================"
echo "You may need to reboot your machine for this to take effect."
echo "============================================================"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment