Manual Installation

Intel QuickSync Driver Installation

Platform Specific Installation

Ubuntu 18/20
CentOS 7
CentOS 8
1
sudo apt install -y libdrm-dev xorg xorg-dev openbox libx11-dev
2
sudo apt install -y libgl1-mesa-glx libgl1-mesa-dev
Copied!
1
# Centos 7 uses the 2.8.x version of cmake by default.
2
# It must be changed to version 3.x or higher.
3
sudo yum remove -y cmake
4
sudo yum install -y cmake3
5
sudo ln -s /usr/bin/cmake3 /usr/bin/cmake
6
7
sudo yum install -y libdrm-devel libX11-devel libXi-devel
Copied!
1
sudo yum install -y libdrm-devel libX11-devel libXi-devel
Copied!

Common Installation

LibVA

1
PREFIX=/opt/ovenmediaengine && \
2
TEMP_PATH=/tmp && \
3
LIBVA_VERSION=2.11.0 && \
4
DIR=${TEMP_PATH}/libva && \
5
mkdir -p ${DIR} && \
6
cd ${DIR} && \
7
curl -sLf https://github.com/intel/libva/archive/refs/tags/${LIBVA_VERSION}.tar.gz | tar -xz --strip-components=1 && \
8
./autogen.sh --prefix="${PREFIX}" && \
9
make -j$(nproc) && \
10
sudo make install && \
11
rm -rf ${DIR})
Copied!

GMMLIB

1
PREFIX=/opt/ovenmediaengine && \
2
TEMP_PATH=/tmp && \
3
GMMLIB_VERSION=20.4.1 && \
4
DIR=${TEMP_PATH}/gmmlib && \
5
mkdir -p ${DIR} && \
6
cd ${DIR} && \
7
curl -sLf https://github.com/intel/gmmlib/archive/refs/tags/intel-gmmlib-${GMMLIB_VERSION}.tar.gz | tar -xz --strip-components=1 && \
8
mkdir -p ${DIR}/build && \
9
cd ${DIR}/build && \
10
cmake -DCMAKE_INSTALL_PREFIX="${PREFIX}" .. && \
11
make -j$(nproc) && \
12
sudo make install && \
13
rm -rf ${DIR}
Copied!

Intel Media Driver

1
PREFIX=/opt/ovenmediaengine && \
2
TEMP_PATH=/tmp && \
3
INTEL_MEDIA_DRIVER_VERSION=20.4.5 && \
4
DIR_IMD=${TEMP_PATH}/media-driver && \
5
mkdir -p ${DIR_IMD} && \
6
cd ${DIR_IMD} && \
7
curl -sLf https://github.com/intel/media-driver/archive/refs/tags/intel-media-${INTEL_MEDIA_DRIVER_VERSION}.tar.gz | tar -xz --strip-components=1 && \
8
DIR_GMMLIB=${TEMP_PATH}/gmmlib && \
9
mkdir -p ${DIR_GMMLIB} && \
10
cd ${DIR_GMMLIB} && \
11
curl -sLf https://github.com/intel/gmmlib/archive/refs/tags/intel-gmmlib-${GMMLIB_VERSION}.tar.gz | tar -xz --strip-components=1 && \
12
DIR=${TEMP_PATH}/build && \
13
mkdir -p ${DIR} && \
14
cd ${DIR} && \
15
PKG_CONFIG_PATH=${PREFIX}/lib/pkgconfig:${PKG_CONFIG_PATH} cmake \
16
$DIR_IMD \
17
-DBUILD_TYPE=release \
18
-DBS_DIR_GMMLIB="$DIR_GMMLIB/Source/GmmLib" \
19
-DBS_DIR_COMMON=$DIR_GMMLIB/Source/Common \
20
-DBS_DIR_INC=$DIR_GMMLIB/Source/inc \
21
-DBS_DIR_MEDIA=$DIR_IMD \
22
-DCMAKE_INSTALL_PREFIX=${PREFIX} \
23
-DCMAKE_INSTALL_LIBDIR=${PREFIX}/lib \
24
-DINSTALL_DRIVER_SYSCONF=OFF \
25
-DLIBVA_DRIVERS_PATH=${PREFIX}/lib/dri && \
26
sudo make -j$(nproc) install && \
27
rm -rf ${DIR} && \
28
rm -rf ${DIR_IMD} && \
29
rm -rf ${DIR_GMMLIB}
30
31
export LIBVA_DRIVERS_PATH=${PREFIX}/lib
32
export LIBVA_DRIVER_NAME=iHD
Copied!

Intel Media SDK

1
PREFIX=/opt/ovenmediaengine && \
2
TEMP_PATH=/tmp && \
3
INTEL_MEDIA_SDK_VERSION=20.5.1 && \
4
DIR=${TEMP_PATH}/medka-sdk && \
5
mkdir -p ${DIR} && \
6
cd ${DIR} && \
7
curl -sLf https://github.com/Intel-Media-SDK/MediaSDK/archive/refs/tags/intel-mediasdk-${INTEL_MEDIA_SDK_VERSION}.tar.gz | tar -xz --strip-components=1 && \
8
mkdir -p ${DIR}/build && \
9
cd ${DIR}/build && \
10
PKG_CONFIG_PATH=${PREFIX}/lib/pkgconfig:${PKG_CONFIG_PATH} cmake -DCMAKE_INSTALL_PREFIX="${PREFIX}" .. && \
11
make -j$(nproc) && \
12
sudo make install && \
13
rm -rf ${DIR}
Copied!
All libraries are installed, the system must be rebooted.

NVIDIA Driver Installation

Platform Specific Installation

Ubuntu 18/20
CentOS 7
CentOS 8
1
# Uninstalling a previously installed NVIDIA Driver
2
sudo apt-get remove --purge nvidia-*
3
sudo apt-get -y autoremove
4
sudo apt-get -y update
5
6
# Remove the nouveau driver. If the nouveau driver is in use, the nvidia driver cannot be installed.
7
USE_NOUVEAU=`sudo lshw -class video | grep nouveau`
8
if [ ! -z "$USE_NOUVEAU" ]; then
9
10
# Disable nouveau Driver
11
echo "blacklist nouveau" >> /etc/modprobe.d/blacklist.conf
12
echo "blacklist lbm-nouveau" >> /etc/modprobe.d/blacklist.conf
13
echo "options nouveau modeset=0" >> /etc/modprobe.d/blacklist.conf
14
echo "alias nouveau off" >> /etc/modprobe.d/blacklist.conf
15
echo "alias lbm-nouveau off" >> /etc/modprobe.d/blacklist.conf
16
sudo update-initramfs -u
17
echo "Using a driver display nouveau.Remove the driver and reboot.Reboot and installation script to rerun the nvidia display the driver to complete the installation."
18
19
sleep 5s
20
reboot
21
fi
22
23
# Install Nvidia Driver and Nvidia Toolkit
24
sudo add-apt-repository ppa:graphics-drivers/ppa
25
sudo apt -y update
26
sudo apt-get install -y $(ubuntu-drivers devices | grep recommended | awk '{print $3}')
27
sudo apt-get install -y nvidia-cuda-toolkit curl make
Copied!
1
# Update Kernel
2
yum -y update
3
yum -y groupinstall "Development Tools"
4
yum -y install kernel-devel
5
yum -y install epel-release
6
yum -y install dkms curl
7
echo "Reboot is required to run with a new version of the kernel."
8
9
# Remove the nouveau driver. If the nouveau driver is in use, the nvidia driver cannot be installed.
10
USE_NOUVEAU=`sudo lshw -class video | grep nouveau`
11
if [ ! -z "$USE_NOUVEAU" ]; then
12
13
# Disable nouveau Driver
14
sed "s/GRUB_CMDLINE_LINUX=\"\(.*\)\"/GRUB_CMDLINE_LINUX=\"\1 rd.driver.blacklist=nouveau nouveau.modeset=0\"/" /etc/default/grub
15
grub2-mkconfig -o /boot/grub2/grub.cfg
16
echo "blacklist nouveau" >> /etc/modprobe.d/blacklist.conf
17
mv /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r)-nouveau.img
18
dracut /boot/initramfs-$(uname -r).img $(uname -r)
19
20
echo "Using a driver display nouveau. so, remove the driver and reboot. "
21
echo "After reboot and installation script to rerun the nvidia display the driver to complete the installation."
22
23
sleep 5s
24
reboot
25
fi
26
27
# Install Nvidia Driver
28
# https://www.nvidia.com/en-us/drivers/unix/
29
systemctl isolate multi-user.target
30
wget -N https://us.download.nvidia.com/XFree86/Linux-x86_64/460.84/NVIDIA-Linux-x86_64-460.84.run
31
sh ./NVIDIA-Linux-x86_64-460.84.run --ui=none --no-questions
32
33
# Install Nvidia Toolkit
34
# https://developer.nvidia.com/cuda-downloads
35
wget -N https://developer.download.nvidia.com/compute/cuda/11.3.1/local_installers/cuda_11.3.1_465.19.01_linux.run
36
sh cuda_11.3.1_465.19.01_linux.run --silent
37
38
# Configure Envionment Variables
39
echo "Please add the PATH below to the environment variable."
40
echo ""
41
echo "export PATH=${PATH}:/usr/local/cuda/bin/"
42
echo ""
43
export PATH=${PATH}:/usr/local/cuda/bin/
Copied!
1
dnf update -y
2
dnf groupinstall -y "Development Tools"
3
dnf install -y elfutils-libelf-devel "kernel-devel-uname-r == $(uname -r)"
4
5
# Remove the nouveau driver. If the nouveau driver is in use, the nvidia driver cannot be installed.
6
USE_NOUVEAU=`sudo lshw -class video | grep nouveau`
7
if [ ! -z "$USE_NOUVEAU" ]; then
8
9
# Disable nouveau Driver
10
echo "blacklist nouveau" >> /etc/modprobe.d/blacklist.conf
11
mv /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r)-nouveau.img
12
dracut /boot/initramfs-$(uname -r).img $(uname -r)
13
14
systemctl set-default multi-user.target
15
systemctl get-default
16
17
echo "Using a driver display nouveau. so, remove the driver and reboot. "
18
echo "After reboot and installation script to rerun the nvidia display the driver to complete the installation."
19
20
sleep 5s
21
reboot
22
fi
23
24
wget -N https://us.download.nvidia.com/XFree86/Linux-x86_64/460.84/NVIDIA-Linux-x86_64-460.84.run
25
sh ./NVIDIA-Linux-x86_64-460.84.run --ui=none --no-questions
26
27
# Install Nvidia Toolkit
28
# https://developer.nvidia.com/cuda-downloads
29
wget -N https://developer.download.nvidia.com/compute/cuda/11.3.1/local_installers/cuda_11.3.1_465.19.01_linux.run
30
sh cuda_11.3.1_465.19.01_linux.run --silent
31
32
systemctl set-default graphical.target
33
systemctl get-default
34
35
# Configure Envionment Variables
36
echo "Please add the PATH below to the environment variable."
37
echo ""
38
echo "export PATH=${PATH}:/usr/local/cuda/bin/"
39
echo ""
40
export PATH=${PATH}:/usr/local/cuda/bin/
Copied!

Common Installation

NVCC Headers

1
PREFIX=/opt/ovenmediaengine && \
2
TEMP_PATH=/tmp && \
3
NVCC_HEADERS=11.0.10.1 && \
4
DIR=${TEMP_PATH}/nvcc-hdr && \
5
mkdir -p ${DIR} && \
6
cd ${DIR} && \
7
curl -sLf https://github.com/FFmpeg/nv-codec-headers/releases/download/n${NVCC_HEADERS}/nv-codec-headers-${NVCC_HEADERS}.tar.gz | tar -xz --strip-components=1 && \
8
sudo make install && \
9
rm -rf ${DIR}
Copied!

NVIDIA Container Toolkit Installation

Platform Specific Installation

Ubuntu 18/20
CentOS 7
CentOS 8
1
# Install Docker 2.x
2
curl https://get.docker.com && sudo systemctl --now enable docker
3
4
# Install NVIDIA Docker Toolkit
5
distribution=$(. /etc/os-release;echo $ID$VERSION_ID) && \
6
curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add - && \
7
curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list
8
9
sudo apt-get update
10
sudo apt-get install -y nvidia-docker2
11
12
# Restart Docker
13
sudo systemctl restart docker
14
15
# Test
16
sudo docker run --rm --gpus all nvidia/cuda:11.0-base nvidia-smi
Copied!
1
sudo yum install -y yum-utils
2
sudo yum-config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo
3
sudo yum repolist -v
4
sudo yum install -y https://download.docker.com/linux/centos/7/x86_64/stable/Packages/containerd.io-1.4.3-3.1.el7.x86_64.rpm
5
sudo yum install docker-ce -y
6
sudo systemctl --now enable docker
7
8
# Install NVIDIA Docker Toolkit
9
distribution=$(. /etc/os-release;echo $ID$VERSION_ID) && \
10
curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.repo | sudo tee /etc/yum.repos.d/nvidia-docker.repo
11
12
if [[ "${OSVERSION}" == "7" ]]; then
13
sudo yum clean expire-cache
14
sudo yum install -y nvidia-docker2
15
elif [[ "${OSVERSION}" == "8" ]]; then
16
sudo dnf clean expire-cache --refresh
17
sudo dnf install -y nvidia-docker2
18
else
19
fail_exit
20
fi
21
22
# Restart Docker
23
sudo systemctl restart docker
24
25
# Test
26
sudo docker run --rm --gpus all nvidia/cuda:11.0-base nvidia-smi
27
Copied!
1
sudo dnf install -y dnf-utils
2
sudo dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo
3
sudo dnf repolist -v
4
sudo dnf install -y https://download.docker.com/linux/centos/7/x86_64/stable/Packages/containerd.io-1.4.3-3.1.el7.x86_64.rpm
5
sudo dnf install docker-ce -y
6
sudo systemctl --now enable docker
7
8
# Install NVIDIA Docker Toolkit
9
distribution=$(. /etc/os-release;echo $ID$VERSION_ID) && \
10
curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.repo | sudo tee /etc/yum.repos.d/nvidia-docker.repo
11
12
if [[ "${OSVERSION}" == "7" ]]; then
13
sudo yum clean expire-cache
14
sudo yum install -y nvidia-docker2
15
elif [[ "${OSVERSION}" == "8" ]]; then
16
sudo dnf clean expire-cache --refresh
17
sudo dnf install -y nvidia-docker2
18
else
19
fail_exit
20
fi
21
22
# Restart Docker
23
sudo systemctl restart docker
24
25
# Test
26
sudo docker run --rm --gpus all nvidia/cuda:11.0-base nvidia-smi
Copied!
Last modified 5d ago