Port changes for installing GPU driver from 2022.3 branch (#15408)
* Port changes for installing GPU driver from 2022.3 branch. * install_openvino_dependencies: Fixed syntax after ShellCheck --------- Co-authored-by: Karol Blaszczak <karol.blaszczak@intel.com>
This commit is contained in:
parent
d72deb955d
commit
8d2eae95a7
@ -7,39 +7,24 @@
|
||||
|
||||
@endsphinxdirective
|
||||
|
||||
In case if you are intended to use OpenVINO GPU plugin and offload network inference to Intel® graphics processor, the Intel Graphics Driver should be properly configured on your system.
|
||||
|
||||
If it is already installed, and you want to keep it, you can skip the installation steps.
|
||||
|
||||
## Linux
|
||||
|
||||
If you have installed OpenVINO Runtime from the archive file, APT, or YUM, follow these steps to work with GPU:
|
||||
To install the latest available **Intel® Graphics Compute Runtime for OpenCL™** for your OS, see the [Install Guides](https://github.com/intel/compute-runtime/releases/latest).
|
||||
|
||||
1. Go to the install_dependencies directory:
|
||||
```sh
|
||||
cd <INSTALL_DIR>/install_dependencies/
|
||||
```
|
||||
> **NOTE**: If you use RedHat 8 OS please install OpenCL library as prerequisite via following command line:
|
||||
> ```sh rpm -ivh http://mirror.centos.org/centos/8-stream/AppStream/x86_64/os/Packages/ocl-icd-2.2.12-1.el8.x86_64.rpm```
|
||||
|
||||
2. Install the **Intel® Graphics Compute Runtime for OpenCL™** driver components required to use the GPU plugin and write custom layers for Intel® Integrated Graphics. The drivers are not included in the package. To install it, run this script:
|
||||
```sh
|
||||
sudo -E ./install_NEO_OCL_driver.sh
|
||||
```
|
||||
> **NOTE**: If you installed OpenVINO Runtime via PyPI, you can get this script from [the OpenVINO repository](https://github.com/openvinotoolkit/openvino/blob/master/scripts/install_dependencies/install_NEO_OCL_driver.sh).
|
||||
> **NOTE**: For instructions specific to discrete graphics platforms, refer to [the dgpu guide](https://dgpu-docs.intel.com/installation-guides/index.html) (Intel® Arc™ A-Series Graphics, Intel® Data Center GPU Flex Series, Intel® Data Center GPU MAX Series, Intel® processor graphics Gen12, and Intel® Iris Xe MAX codename DG1).
|
||||
|
||||
> **NOTE**: To use the **Intel® Iris® Xe MAX Graphics**, see the [Intel® Iris® Xe MAX Graphics with Linux*](https://dgpu-docs.intel.com/devices/iris-xe-max-graphics/index.html) page for driver installation instructions.
|
||||
|
||||
The script compares the driver version on the system to the current version. If the driver version on the system is higher or equal to the current version, the script does
|
||||
not install a new driver. If the version of the driver is lower than the current version, the script uninstalls the lower version and installs the current version with your permission:
|
||||

|
||||
You may consider installing one of the earlier versions of the driver, based on your particular setup needs.
|
||||
|
||||
Higher hardware versions require a higher driver version, namely 20.35 instead of 19.41. If the script fails to uninstall the driver, uninstall it manually. During the script execution, you may see the following command line output:
|
||||
```sh
|
||||
Add OpenCL user to video group
|
||||
```
|
||||
Ignore this suggestion and continue.<br>
|
||||
You can also find the most recent version of the driver, installation procedure and other information on the [Intel® software for general purpose GPU capabilities](https://dgpu-docs.intel.com/index.html) site.
|
||||
It is recommended that you refer to the [Intel® Graphics Compute Runtime Github page](https://github.com/intel/compute-runtime/) for instructions and recommendations on GPU driver installation specific to particular releases, including the list of supported hardware platforms.
|
||||
|
||||
3. **Optional:** Install header files to allow compilation of new code. You can find the header files at [Khronos OpenCL™ API Headers](https://github.com/KhronosGroup/OpenCL-Headers.git).
|
||||
|
||||
You've completed all required configuration steps to perform inference on processor graphics.
|
||||
@sphinxdirective
|
||||
|
||||
.. _gpu guide windows:
|
||||
@ -48,24 +33,31 @@ You've completed all required configuration steps to perform inference on proces
|
||||
|
||||
## Windows
|
||||
|
||||
This section will help you check if you require driver installation. Install indicated version or higher.
|
||||
|
||||
If your applications offload computation to **Intel® Integrated Graphics**, you must have the Intel Graphics Driver for Windows installed on your hardware.
|
||||
[Download and install the recommended version](https://downloadcenter.intel.com/download/30079/Intel-Graphics-Windows-10-DCH-Drivers).
|
||||
To install the Intel Graphics Driver for Windows on your hardware, please proceed with the [instruction](https://www.intel.com/content/www/us/en/support/articles/000005629/graphics.html).
|
||||
|
||||
To check if you have this driver installed:
|
||||
|
||||
1. Type **device manager** in your **Search Windows** box and press Enter. The **Device Manager** opens.
|
||||
|
||||
2. Click the drop-down arrow to view the **Display adapters**. You can see the adapter that is installed in your computer:
|
||||

|
||||
|
||||
2. Click the drop-down arrow to view the **Display adapters**. You can see the adapter that is installed in your computer:
|
||||

|
||||
3. Right-click the adapter name and select **Properties**.
|
||||
4. Click the **Driver** tab to see the driver version.
|
||||

|
||||
|
||||
4. Click the **Driver** tab to see the driver version.
|
||||

|
||||
|
||||
You are done updating your device driver and are ready to use your GPU.
|
||||
|
||||
## Additional info
|
||||
|
||||
In the internal OpenVINO validation the following versions of Intel Graphics Driver were used:
|
||||
|
||||
Operation System | Driver version
|
||||
--- |-------------------------
|
||||
Ubuntu 20.04 | [22.35.24055](https://github.com/intel/compute-runtime/releases/tag/22.35.24055)
|
||||
Ubuntu 18.04 | [21.38.21026](https://github.com/intel/compute-runtime/releases/tag/21.38.21026)
|
||||
CentOS 7 | [19.41.14441](https://github.com/intel/compute-runtime/releases/tag/19.41.14441)
|
||||
RHEL 8 | [22.28.23726](https://github.com/intel/compute-runtime/releases/tag/22.28.23726)
|
||||
|
||||
## What’s Next?
|
||||
|
||||
You can try out the toolkit with:
|
||||
@ -79,4 +71,3 @@ Developing in C++:
|
||||
* [Image Classification Async C++ Sample](@ref openvino_inference_engine_samples_classification_sample_async_README)
|
||||
* [Hello Classification C++ Sample](@ref openvino_inference_engine_samples_hello_classification_README)
|
||||
* [Hello Reshape SSD C++ Sample](@ref openvino_inference_engine_samples_hello_reshape_ssd_README)
|
||||
|
||||
|
@ -57,9 +57,6 @@ if(LINUX)
|
||||
ie_cpack_add_component(${OV_CPACK_COMP_INSTALL_DEPENDENCIES} HIDDEN)
|
||||
|
||||
set(install_dependencies_files install_openvino_dependencies.sh)
|
||||
if(ENABLE_INTEL_GPU)
|
||||
list(APPEND install_dependencies_files install_NEO_OCL_driver.sh)
|
||||
endif()
|
||||
|
||||
foreach(install_dependencies_file IN LISTS install_dependencies_files)
|
||||
install(PROGRAMS "${CMAKE_CURRENT_SOURCE_DIR}/install_dependencies/${install_dependencies_file}"
|
||||
|
@ -1,470 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright (C) 2018-2023 Intel Corporation
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#
|
||||
# Installs the Intel® Graphics Compute Runtime for oneAPI Level Zero and OpenCL™ Driver on Linux.
|
||||
#
|
||||
# Usage: sudo -E ./install_NEO_OCL_driver.sh
|
||||
#
|
||||
# Supported platforms:
|
||||
# 6th-11th generation Intel® Core™ processor with Intel(R)
|
||||
# Processor Graphics Technology not previously disabled by the BIOS
|
||||
# or motherboard settings
|
||||
#
|
||||
EXIT_FAILURE=1
|
||||
EXIT_WRONG_ARG=2
|
||||
UBUNTU_VERSION=
|
||||
DISTRO=
|
||||
SCRIPT_DIR="$( cd "$( dirname "$(realpath "${BASH_SOURCE[0]}")" )" >/dev/null 2>&1 && pwd )"
|
||||
INSTALL_DRIVER_VERSION='unknown'
|
||||
|
||||
|
||||
print_help()
|
||||
{
|
||||
# Display Help
|
||||
usage="Usage: $(basename "$0") [OPTIONS]...
|
||||
Download and installs the Intel® Graphics Compute Runtime for oneAPI Level Zero and OpenCL™ Driver on Linux
|
||||
|
||||
Available options:
|
||||
-y Replace the currently installed driver with the newer version.
|
||||
--no_numa Skip installing NUMA packages. (off)
|
||||
-h, --help Display this help and exit"
|
||||
echo "$usage"
|
||||
}
|
||||
|
||||
while [[ $# -gt 0 ]]
|
||||
do
|
||||
key="$1"
|
||||
case $key in
|
||||
-d|--install_driver)
|
||||
echo "WARNING: This option is deprecated. Recommended driver for current platform will be installed."
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-y)
|
||||
agreement=true
|
||||
shift
|
||||
;;
|
||||
-a|--auto)
|
||||
echo "WARNING: This option is deprecated. Recommended driver for current platform will be installed."
|
||||
shift
|
||||
;;
|
||||
--no_numa)
|
||||
no_numa=true
|
||||
shift
|
||||
;;
|
||||
-h|--help)
|
||||
print_help
|
||||
exit
|
||||
;;
|
||||
*)
|
||||
echo "$(basename "$0"): invalid option -- '${key}'"
|
||||
echo "Try '$(basename "$0") --help' for more information."
|
||||
exit $EXIT_WRONG_ARG
|
||||
esac
|
||||
done
|
||||
|
||||
_install_prerequisites_redhat()
|
||||
{
|
||||
# yum doesn't accept timeout in seconds as parameter
|
||||
echo
|
||||
echo "Note: if yum becomes non-responsive, try aborting the script and run:"
|
||||
echo " sudo -E $0"
|
||||
echo
|
||||
CMDS=("dnf install -y 'dnf-command(config-manager)'"
|
||||
"dnf config-manager --add-repo \
|
||||
https://repositories.intel.com/graphics/rhel/8.5/intel-graphics.repo")
|
||||
|
||||
for cmd in "${CMDS[@]}"; do
|
||||
echo "$cmd"
|
||||
if ! eval "$cmd"; then
|
||||
echo "ERROR: failed to run $cmd" >&2
|
||||
echo "Problem (or disk space)?" >&2
|
||||
echo ". Verify that you have enough disk space, and run the script again." >&2
|
||||
exit $EXIT_FAILURE
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
_install_prerequisites_ubuntu()
|
||||
{
|
||||
apt-get update
|
||||
apt-get install -y gpg-agent
|
||||
curl https://repositories.intel.com/graphics/intel-graphics.key |gpg --dearmor --output /usr/share/keyrings/intel-graphics.gpg
|
||||
echo 'deb [arch=amd64 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/graphics/ubuntu focal-legacy main' | tee /etc/apt/sources.list.d/intel.gpu.focal.list
|
||||
apt-get update
|
||||
if [ "$no_numa" == true ]; then
|
||||
CMDS=("apt-get -y install --no-install-recommends ocl-icd-libopencl1")
|
||||
else
|
||||
CMDS=("apt-get -y install --no-install-recommends libnuma1 ocl-icd-libopencl1")
|
||||
fi
|
||||
|
||||
for cmd in "${CMDS[@]}"; do
|
||||
echo "$cmd"
|
||||
if ! eval "$cmd"; then
|
||||
echo "ERROR: failed to run $cmd" >&2
|
||||
echo "Problem (or disk space)?" >&2
|
||||
echo " sudo -E $0" >&2
|
||||
echo "2. Verify that you have enough disk space, and run the script again." >&2
|
||||
exit $EXIT_FAILURE
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
install_prerequisites()
|
||||
{
|
||||
echo 'Installing prerequisites...'
|
||||
if [[ $DISTRO == "redhat" ]]; then
|
||||
_install_prerequisites_redhat
|
||||
elif [[ $DISTRO == "ubuntu" ]]; then
|
||||
_install_prerequisites_ubuntu
|
||||
else
|
||||
echo 'WARNING::install_prerequisites: Unknown OS'
|
||||
fi
|
||||
}
|
||||
|
||||
_deploy_rpm()
|
||||
{
|
||||
cmd="rpm $IGFX_RPM_FLAGS -ivh --nodeps --force $1"
|
||||
echo "$cmd"
|
||||
eval "$cmd"
|
||||
}
|
||||
|
||||
_deploy_deb()
|
||||
{
|
||||
cmd="dpkg -i $1"
|
||||
echo "$cmd"
|
||||
eval "$cmd"
|
||||
}
|
||||
|
||||
_install_user_mode_redhat()
|
||||
{
|
||||
|
||||
CMDS=("rpm -ivh https://vault.centos.org/centos/8/AppStream/x86_64/os/Packages/mesa-filesystem-21.1.5-1.el8.x86_64.rpm" \
|
||||
"dnf install --refresh -y \
|
||||
intel-opencl-22.28.23726.1-i419.el8.x86_64 intel-media intel-mediasdk libmfxgen1 libvpl2 \
|
||||
level-zero intel-level-zero-gpu \
|
||||
intel-metrics-library intel-igc-core intel-igc-cm \
|
||||
libva libva-utils intel-gmmlib" \
|
||||
"rpm -ivh http://mirror.centos.org/centos/8-stream/AppStream/x86_64/os/Packages/ocl-icd-2.2.12-1.el8.x86_64.rpm" )
|
||||
|
||||
for cmd in "${CMDS[@]}"; do
|
||||
echo "$cmd"
|
||||
if ! eval "$cmd"; then
|
||||
echo "ERROR: failed to run $cmd" >&2
|
||||
echo "Problem (or disk space)?" >&2
|
||||
echo " sudo -E $0" >&2
|
||||
echo "Verify that you have enough disk space, and run the script again." >&2
|
||||
exit $EXIT_FAILURE
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
_install_user_mode_ubuntu()
|
||||
{
|
||||
if ! 'find . -name "intel*.deb" -exec dpkg -i {} \;'; then
|
||||
echo "ERROR: failed to install debs $cmd error" >&2
|
||||
echo "Make sure you have enough disk space or fix the problem manually and try again." >&2
|
||||
exit $EXIT_FAILURE
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
install_user_mode()
|
||||
{
|
||||
echo "Installing user mode driver..."
|
||||
|
||||
if [[ $DISTRO == "redhat" ]]; then
|
||||
_install_user_mode_redhat
|
||||
else
|
||||
_install_user_mode_ubuntu
|
||||
fi
|
||||
# exit from $SCRIPT_DIR/neo folder
|
||||
cd - || exit
|
||||
# clean it up
|
||||
rm -rf "$SCRIPT_DIR/neo"
|
||||
}
|
||||
|
||||
_uninstall_user_mode_redhat()
|
||||
{
|
||||
echo Looking for previously installed user-mode driver...
|
||||
PACKAGES=("intel-opencl"
|
||||
"intel-ocloc"
|
||||
"intel-gmmlib"
|
||||
"intel-igc-core"
|
||||
"intel-igc-opencl")
|
||||
for package in "${PACKAGES[@]}"; do
|
||||
echo "rpm -qa | grep $package"
|
||||
if found_package=$(rpm -qa | grep "$package"); then
|
||||
echo "Found installed user-mode driver, performing uninstall..."
|
||||
cmd="rpm -e --nodeps ${found_package}"
|
||||
echo "$cmd"
|
||||
if ! eval "$cmd"; then
|
||||
echo "ERROR: failed to uninstall existing user-mode driver." >&2
|
||||
echo "Please try again manually and run the script again." >&2
|
||||
exit $EXIT_FAILURE
|
||||
fi
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
_uninstall_user_mode_ubuntu()
|
||||
{
|
||||
echo Looking for previously installed user-mode driver...
|
||||
|
||||
PACKAGES=("intel-opencl"
|
||||
"intel-opencl-icd"
|
||||
"intel-ocloc"
|
||||
"intel-gmmlib"
|
||||
"intel-igc-core"
|
||||
"intel-igc-opencl")
|
||||
|
||||
for package in "${PACKAGES[@]}"; do
|
||||
if found_package=$(dpkg-query -W -f='${binary:Package}\n' "${package}"); then
|
||||
echo "Found installed user-mode driver, performing uninstall..."
|
||||
cmd="apt-get autoremove -y $package"
|
||||
echo "$cmd"
|
||||
if ! eval "$cmd"; then
|
||||
echo "ERROR: failed to uninstall existing user-mode driver." >&2
|
||||
echo "Please try again manually and run the script again." >&2
|
||||
exit $EXIT_FAILURE
|
||||
fi
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
uninstall_user_mode()
|
||||
{
|
||||
if [[ $DISTRO == "redhat" ]]; then
|
||||
_uninstall_user_mode_redhat
|
||||
else
|
||||
_uninstall_user_mode_ubuntu
|
||||
fi
|
||||
}
|
||||
|
||||
_get_packages_ubuntu()
|
||||
{
|
||||
case $INSTALL_DRIVER_VERSION in
|
||||
"21.38.21026")
|
||||
curl -L -O https://github.com/intel/compute-runtime/releases/download/21.38.21026/intel-gmmlib_21.2.1_amd64.deb
|
||||
curl -L -O https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.8708/intel-igc-core_1.0.8708_amd64.deb
|
||||
curl -L -O https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.8708/intel-igc-opencl_1.0.8708_amd64.deb
|
||||
curl -L -O https://github.com/intel/compute-runtime/releases/download/21.38.21026/intel-opencl_21.38.21026_amd64.deb
|
||||
curl -L -O https://github.com/intel/compute-runtime/releases/download/21.38.21026/intel-ocloc_21.38.21026_amd64.deb
|
||||
curl -L -O https://github.com/intel/compute-runtime/releases/download/21.38.21026/intel-level-zero-gpu_1.2.21026_amd64.deb
|
||||
;;
|
||||
"21.48.21782")
|
||||
curl -L -O https://github.com/intel/compute-runtime/releases/download/21.48.21782/intel-gmmlib_21.3.3_amd64.deb
|
||||
curl -L -O https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.9441/intel-igc-core_1.0.9441_amd64.deb
|
||||
curl -L -O https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.9441/intel-igc-opencl_1.0.9441_amd64.deb
|
||||
curl -L -O https://github.com/intel/compute-runtime/releases/download/21.48.21782/intel-opencl-icd_21.48.21782_amd64.deb
|
||||
curl -L -O https://github.com/intel/compute-runtime/releases/download/21.48.21782/intel-level-zero-gpu_1.2.21782_amd64.deb
|
||||
;;
|
||||
"22.35.24055")
|
||||
apt-get install -y \
|
||||
intel-opencl-icd=22.35.24055+i815~u20.04 \
|
||||
intel-level-zero-gpu=1.3.24055+i815~u20.04 \
|
||||
level-zero=1.8.5+i815~u20.04
|
||||
;;
|
||||
*)
|
||||
echo "ERROR: Unrecognized driver ${INSTALL_DRIVER_VERSION}."
|
||||
exit $EXIT_WRONG_ARG
|
||||
esac
|
||||
}
|
||||
|
||||
_verify_checksum_ubuntu()
|
||||
{
|
||||
case $INSTALL_DRIVER_VERSION in
|
||||
"21.38.21026")
|
||||
curl -L -O https://github.com/intel/compute-runtime/releases/download/21.38.21026/ww38.sum
|
||||
sha256sum -c ww38.sum
|
||||
;;
|
||||
"21.48.21782")
|
||||
curl -L -O https://github.com/intel/compute-runtime/releases/download/21.48.21782/ww48.sum
|
||||
sha256sum -c ww48.sum
|
||||
;;
|
||||
"22.35.24055")
|
||||
echo "Verification by apt"
|
||||
;;
|
||||
*)
|
||||
echo "ERROR: Unrecognized driver ${INSTALL_DRIVER_VERSION}."
|
||||
exit $EXIT_WRONG_ARG
|
||||
esac
|
||||
}
|
||||
|
||||
verify_checksum()
|
||||
{
|
||||
if [[ $DISTRO == "redhat" ]]; then
|
||||
return 0
|
||||
else
|
||||
_verify_checksum_ubuntu
|
||||
fi
|
||||
}
|
||||
|
||||
get_packages()
|
||||
{
|
||||
mkdir -p "$SCRIPT_DIR/neo"
|
||||
cd "$SCRIPT_DIR/neo" || exit
|
||||
|
||||
if [[ $DISTRO == "redhat" ]]; then
|
||||
return 0
|
||||
else
|
||||
_get_packages_ubuntu
|
||||
fi
|
||||
if ! verify_checksum; then
|
||||
echo "ERROR: checksums do not match for the downloaded packages"
|
||||
echo " Please verify your Internet connection and make sure you have enough disk space or fix the problem manually and try again. "
|
||||
exit $EXIT_FAILURE
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
version_gt() {
|
||||
# check if first version is greater than second version
|
||||
test "$(printf '%s\n' "$@" | sort -V | head -n 1)" != "$1";
|
||||
}
|
||||
|
||||
summary()
|
||||
{
|
||||
echo
|
||||
echo "Installation completed successfully."
|
||||
echo
|
||||
echo "Next steps:"
|
||||
echo "Add OpenCL users to the video and render group: 'sudo usermod -a -G video,render USERNAME'"
|
||||
echo " e.g. if the user running OpenCL host applications is foo, run: sudo usermod -a -G video,render foo"
|
||||
echo " Current user has been already added to the video and render group"
|
||||
echo
|
||||
|
||||
echo "If you use 8th Generation Intel® Core™ processor, add:"
|
||||
echo " i915.alpha_support=1"
|
||||
echo " to the 4.14 kernel command line, in order to enable OpenCL functionality for this platform."
|
||||
echo
|
||||
}
|
||||
|
||||
check_root_access()
|
||||
{
|
||||
if [[ $EUID -ne 0 ]]; then
|
||||
echo "ERROR: you must run this script as root." >&2
|
||||
echo "Please try again with \"sudo -E $0\", or as root." >&2
|
||||
exit $EXIT_FAILURE
|
||||
fi
|
||||
}
|
||||
|
||||
add_user_to_video_group()
|
||||
{
|
||||
local real_user
|
||||
real_user=$(logname 2>/dev/null || echo "${SUDO_USER:-${USER}}")
|
||||
echo
|
||||
echo "Adding $real_user to the video group..."
|
||||
if ! usermod -a -G video "$real_user"; then
|
||||
echo "WARNING: unable to add $real_user to the video group" >&2
|
||||
fi
|
||||
echo "Adding $real_user to the render group..."
|
||||
if ! usermod -a -G render "$real_user"; then
|
||||
echo "WARNING: unable to add $real_user to the render group" >&2
|
||||
fi
|
||||
}
|
||||
|
||||
_check_distro_version()
|
||||
{
|
||||
if [[ $DISTRO == redhat ]]; then
|
||||
RHEL_MINOR_VERSION_SUPPORTED="[3-7]"
|
||||
if ! eval grep -m1 'VERSION_ID' /etc/os-release | grep -Eo "8.${RHEL_MINOR_VERSION_SUPPORTED}"; then
|
||||
echo "Warning: This runtime can be installed only on RHEL 8.3 up to RHEL 8.7"
|
||||
echo "More info https://dgpu-docs.intel.com/releases/releases-20211130.html" >&2
|
||||
echo "Installation of Intel® Graphics Compute Runtime for oneAPI Level Zero and OpenCL™ Driver interrupted"
|
||||
exit $EXIT_FAILURE
|
||||
else
|
||||
INSTALL_DRIVER_VERSION='22.28.23726'
|
||||
fi
|
||||
elif [[ $DISTRO == ubuntu ]]; then
|
||||
UBUNTU_VERSION=$(grep -m1 'VERSION_ID' /etc/os-release | grep -Eo "[0-9]{2}.[0-9]{2}")
|
||||
if [[ $UBUNTU_VERSION == '18.04' ]]; then
|
||||
INSTALL_DRIVER_VERSION='21.38.21026'
|
||||
elif [[ $UBUNTU_VERSION == '20.04' ]]; then
|
||||
INSTALL_DRIVER_VERSION='22.35.24055'
|
||||
else
|
||||
echo "Warning: This runtime can be installed only on Ubuntu 18.04 or Ubuntu 20.04."
|
||||
echo "More info https://github.com/intel/compute-runtime/releases" >&2
|
||||
echo "Installation of Intel® Graphics Compute Runtime for oneAPI Level Zero and OpenCL™ Driver interrupted"
|
||||
exit $EXIT_FAILURE
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
distro_init()
|
||||
{
|
||||
if [[ -f /etc/redhat-release ]]; then
|
||||
DISTRO="redhat"
|
||||
elif [[ -f /etc/lsb-release ]]; then
|
||||
DISTRO="ubuntu"
|
||||
fi
|
||||
|
||||
_check_distro_version
|
||||
}
|
||||
|
||||
check_agreement()
|
||||
{
|
||||
if [ "$agreement" == true ]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
echo "This script will download and install Intel® Graphics Compute Runtime for oneAPI Level Zero and OpenCL™ Driver $INSTALL_DRIVER_VERSION, "
|
||||
echo "that was used to validate this OpenVINO™ package."
|
||||
echo "In case if you already have the driver - script will try to remove it."
|
||||
while true; do
|
||||
read -rp "Want to proceed? (y/n): " yn
|
||||
case $yn in
|
||||
[Yy]*) return 0 ;;
|
||||
[Nn]*) exit $EXIT_FAILURE ;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
check_current_driver()
|
||||
{
|
||||
echo "Checking current driver version..."
|
||||
if [[ $DISTRO == redhat ]]; then
|
||||
gfx_version=$(yum info intel-opencl | grep Version)
|
||||
elif [[ $DISTRO == ubuntu ]]; then
|
||||
gfx_version=$(dpkg-query --showformat='${Version}' --show intel-opencl)
|
||||
if [[ -z "$gfx_version" ]]; then
|
||||
gfx_version=$(dpkg-query --showformat='${Version}' --show intel-opencl-icd)
|
||||
fi
|
||||
fi
|
||||
|
||||
gfx_version="$(echo -e "${gfx_version}" | grep -Eo "[0-9]{2,3}\.[0-9]{2,3}\.[0-9]{3,6}")"
|
||||
|
||||
# install NEO OCL driver if the current driver version < INSTALL_DRIVER_VERSION
|
||||
if [[ -n $gfx_version && "$(printf '%s\n' "$INSTALL_DRIVER_VERSION" "$gfx_version" | sort -V | head -n 1)" = "$INSTALL_DRIVER_VERSION" ]]; then
|
||||
echo "Intel® Graphics Compute Runtime for oneAPI Level Zero and OpenCL™ Driver installation skipped because current version greater or equal to $INSTALL_DRIVER_VERSION" >&2
|
||||
echo "Installation of Intel® Graphics Compute Runtime for oneAPI Level Zero and OpenCL™ Driver interrupted." >&2
|
||||
exit $EXIT_FAILURE
|
||||
else
|
||||
echo "Starting installation..."
|
||||
fi
|
||||
}
|
||||
|
||||
install()
|
||||
{
|
||||
uninstall_user_mode
|
||||
install_prerequisites
|
||||
get_packages
|
||||
install_user_mode
|
||||
add_user_to_video_group
|
||||
}
|
||||
|
||||
main()
|
||||
{
|
||||
echo "Intel® Graphics Compute Runtime for oneAPI Level Zero and OpenCL™ Driver installer"
|
||||
distro_init
|
||||
check_root_access
|
||||
check_current_driver
|
||||
check_agreement
|
||||
install
|
||||
summary
|
||||
}
|
||||
|
||||
[[ "$0" == "${BASH_SOURCE[0]}" ]] && main "$@"
|
@ -8,7 +8,7 @@ set -e
|
||||
#===================================================================================================
|
||||
# Option parsing
|
||||
|
||||
all_comp=(core dev python)
|
||||
all_comp=(core dev gpu python)
|
||||
os=${os:-auto}
|
||||
|
||||
# public options
|
||||
@ -117,12 +117,14 @@ if [ "$os" == "raspbian9" ] || [ "$os" == "debian9" ] ; then
|
||||
# which are not supported by OpenVINO
|
||||
|
||||
pkgs_core=(libpugixml1v5)
|
||||
pkgs_gpu=()
|
||||
pkgs_python=()
|
||||
pkgs_dev=(pkg-config g++ gcc libc6-dev libgflags-dev zlib1g-dev nlohmann-json-dev make curl sudo)
|
||||
|
||||
elif [ "$os" == "ubuntu18.04" ] ; then
|
||||
|
||||
pkgs_core=(libtbb2 libpugixml1v5)
|
||||
pkgs_gpu=()
|
||||
pkgs_python=(python3.8 libpython3.8 python3.8-venv python3-pip)
|
||||
pkgs_dev=(cmake pkg-config g++ gcc libc6-dev libgflags-dev zlib1g-dev nlohmann-json-dev make curl sudo)
|
||||
|
||||
@ -131,6 +133,7 @@ elif [ "$os" == "ubuntu20.04" ] || [ "$os" == "debian10" ] || [ "$os" == "raspbi
|
||||
[ "$os" == "ubuntu22.10" ] || [ "$os" == "debian12" ] || [ "$os" == "raspbian12" ]; then
|
||||
|
||||
pkgs_core=(libpugixml1v5)
|
||||
pkgs_gpu=()
|
||||
pkgs_python=(python3 python3-venv python3-pip)
|
||||
pkgs_dev=(cmake pkg-config g++ gcc libc6-dev libgflags-dev zlib1g-dev nlohmann-json3-dev make curl sudo)
|
||||
|
||||
@ -163,6 +166,7 @@ elif [ "$os" == "centos7" ] || [ "$os" == "centos8" ] ||
|
||||
fi
|
||||
|
||||
pkgs_dev=(gcc gcc-c++ make glibc libstdc++ libgcc cmake3 "json-devel.$arch" "zlib-devel.$arch" sudo)
|
||||
pkgs_gpu=()
|
||||
|
||||
if [ "$os" == "centos7" ] || [ "$os" == "amzn2" ] ; then
|
||||
pkgs_dev+=(pkgconfig)
|
||||
@ -193,6 +197,9 @@ elif [ "$os" == "centos7" ] || [ "$os" == "centos8" ] ||
|
||||
"https://download-ib01.fedoraproject.org/pub/epel/8/Everything/$arch/Packages/p/pugixml-1.13-1.el8.$arch.rpm"
|
||||
"https://vault.centos.org/centos/8/PowerTools/$arch/os/Packages/gflags-2.1.2-6.el8.$arch.rpm"
|
||||
)
|
||||
pkgs_gpu+=(
|
||||
"http://mirror.centos.org/centos/8-stream/AppStream/x86_64/os/Packages/ocl-icd-2.2.12-1.el8.x86_64.rpm"
|
||||
)
|
||||
pkgs_python+=(python38 python38-pip)
|
||||
pkgs_dev+=(
|
||||
"https://vault.centos.org/centos/8/PowerTools/$arch/os/Packages/gflags-devel-2.1.2-6.el8.$arch.rpm"
|
||||
|
@ -60,8 +60,7 @@
|
||||
"dependencies" : ["ie_core"],
|
||||
"files": [
|
||||
"runtime/lib/intel64/cache.json",
|
||||
"runtime/lib/intel64/libopenvino_intel_gpu_plugin.so",
|
||||
"install_dependencies/install_NEO_OCL_driver.sh"
|
||||
"runtime/lib/intel64/libopenvino_intel_gpu_plugin.so"
|
||||
]
|
||||
},
|
||||
"gna": {
|
||||
|
Loading…
Reference in New Issue
Block a user