---
# System prepended metadata

title: Ubuntu 18.04 Host + 20.04 docker on TGL

---

# Ubuntu 18.04 Host + 20.04 docker on TGL

Install 18.04.4 + apt update && apt upgrade to latest

### Update kernel with TGL patch

uname -a
wget https://github.com/intel/linux-intel-lts/archive/refs/tags/lts-v5.4.102-yocto-210310T010318Z.tar.gz

sudo apt update
sudo apt-get build-dep linux linux-image-$(uname -r)
sudo apt-get install libncurses-dev gawk flex bison openssl libssl-dev dkms libelf-dev libudev-dev libpci-dev libiberty-dev autoconf

tar -xzf lts-v5.4.102-yocto-210310T010318Z.tar.gz 
cd linux-intel-lts-lts-v5.4.102-yocto-210310T010318Z/
cp /boot/config-5.4.0-73-generic .config
make oldconfig
make
sudo make INSTALL_MOD_STRIP=1 modules_install
sudo make install
sudo vi /etc/default/grub

##### Then edit the Linux kernel boot option and add “i915.force_probe=* i915.enable_guc=2” to force GPU module probe

![](https://i.imgur.com/1vNbhOH.png)


sudo update-grub
cd
wget https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/i915/tgl_guc_35.2.0.bin
wget https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/i915/tgl_huc_7.0.12.bin
wget https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/i915/tgl_dmc_ver2_04.bin
sudo cp *bin /lib/firmware/i915/
sudo update-initramfs -u

##### After reboot

uname -a 
sudo cat /sys/kernel/debug/dri/0/i915_gpu_info

##### Run 20.04 docker
sudo apt update
sudo apt-get remove docker docker-engine docker.io containerd runc
sudo apt install curl
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo usermod -aG docker $USER
sudo docker run hello-world

##### Reboot to enable normal user to run docker command directly

##### Run pre-built ubutu 20.04 + OpenVINO 2021.3 + OpenCL Runtime docker image
docker pull chungyehwangai/openvino:2021.3_developer_models
docker run -it -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY -v ~/Downloads:/mnt --device /dev/dri:/dev/dri --rm chungyehwangai/openvino:2021.3_developer_models

##### YOLO v3 416x416 on 6305E

![](https://i.imgur.com/RGzi4cz.png)

##### YOLO v4 608x608 on 6305E

![](https://i.imgur.com/PeOn0Yw.png)


### Run GPU inference in 20.04 docker

docker run -it -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY -v ~/Downloads:/mnt --device /dev/dri:/dev/dri -u root --rm openvino/ubuntu20_data_dev:latest
/opt/intel/openvino_2021.3.394/install_NEO_OCL_driver.sh -d 20.35.17767
 python3 deployment_tools/tools/benchmark_tool/benchmark_app.py -m /mnt/openvino_models/public/yolo-v3-tf/FP16-INT8/yolo-v3-tf.xml -d GPU

### Reference

### Build your own kernel

https://wiki.ubuntu.com/Kernel/BuildYourOwnKernel

### Mainline Build

https://wiki.ubuntu.com/Kernel/MainlineBuilds

### SVET for TGL kernel BKM
https://software.intel.com/content/www/us/en/develop/topics/iot/reference-implementations/concurrent-video-analytic-pipeline-optimization.html

https://raw.githubusercontent.com/intel-iot-devkit/concurrent-video-analytic-pipeline-optimization-sample-l/master/doc/concurrent_video_analytic_sample_application_user_guide_2020.3.0.pdf