Skip to content

Instantly share code, notes, and snippets.

@Grippy98
Created April 27, 2024 17:31
Show Gist options
  • Save Grippy98/eeb779f2b1d435181b55445c8d51046d to your computer and use it in GitHub Desktop.
Save Grippy98/eeb779f2b1d435181b55445c8d51046d to your computer and use it in GitHub Desktop.
#!/bin/bash
# Add the Google Coral Edge TPU repository to the system's source list
# This repository contains packages specifically for the Coral Edge TPU
echo "deb https://packages.cloud.google.com/apt coral-edgetpu-stable main" | sudo tee /etc/apt/sources.list.d/coral-edgetpu.list
# Download and add the Google GPG key to the system
# This key is used to ensure the integrity and authenticity of the packages
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
# Update the package lists for packages that need upgrading, as well as new packages that have just come to the repositories
sudo apt update
sudo apt upgrade
sudo apt-get install linux-headers-$(uname -r)
# Install the kernel module for Google's Gasket driver framework
# Option 1: from repository - still doesn't work for kernel 6.6.20
# Option 2: from source
# Option 1 - BEGIN
# sudo apt-get install gasket-dkms -y
# Option 1 - END
# Option 2 - BEGIN
# Install packages required for building gasket-driver
sudo apt install curl devscripts debhelper dkms build-essential lintian -y
# Clone gasket-driver from GitHub repository
git clone https://github.com/google/gasket-driver.git
# Build gasket-driver deb package
cd gasket-driver; debuild -us -uc -tc -b; cd ..
# Install gasket-driver from deb package
sudo dpkg -i gasket-dkms_1.0-18_all.deb
# Option 2 - END
# load the gasket-driver
sudo depmod -a
sudo modprobe apex
# Install the Edge TPU runtime
sudo apt-get install libedgetpu1-std -y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment