Install Coral TPU on the Host

Before using Coral TPU inside an LXC container, the drivers must first be installed on the Proxmox VE host. This script automates that process, ensuring the necessary setup is completed.

This guide explains how to install and configure Google Coral TPU drivers on a Proxmox VE host using ProxMenux. This setup enables hardware acceleration for AI-based applications that leverage Coral TPU.

Overview

The script automates the following steps:

  1. Prompts for confirmation before proceeding with installation.
  2. Verifies and configures necessary repositories on the host.
  3. Installs required build dependencies and kernel headers for driver compilation.
  4. Clones the Coral TPU driver repository and builds the drivers.
  5. Installs the compiled Coral TPU drivers.
  6. Prompts for a system restart to apply changes.

Implementation Steps

1

Pre-Installation Confirmation

The script prompts the user for confirmation before proceeding, as a system restart is required after installation.

2

Repository Configuration

The script verifies and configures required repositories:

  • Adds the pve-no-subscription repository if not present.
  • Adds non-free-firmware repositories for required packages.
  • Runs apt-get update to fetch the latest package lists.
3

Driver Installation

The script installs and compiles the required Coral TPU drivers:

  • Installs the following packages:
    • git
    • devscripts
    • dh-dkms
    • dkms
    • pve-headers-$(uname -r) (Proxmox kernel headers)
  • Clones the Coral TPU driver source from:
    • https://github.com/google/gasket-driver
  • Builds the driver using debuild and installs it using dpkg -i.
# Commands used to build and install Coral TPU driver on host
apt install -y git devscripts dh-dkms dkms pve-headers-$(uname -r)
git clone https://github.com/google/gasket-driver.git
cd gasket-driver
debuild -us -uc -tc -b
dpkg -i ../gasket-dkms_*.deb
4

Post-Installation Confirmation

The script prompts the user to restart the server to apply the changes.

Expected Results

  • The Coral TPU drivers are installed successfully on the Proxmox VE host.
  • Required repositories and dependencies are configured properly.
  • A system restart is performed to complete the installation.