View on GitHub

Tenstorrent Stack

Install the complete Tenstorrent software stack on Ubuntu 22.04 with a single command

Note: This is not an official script by Tenstorrent. This is a script that is fanmade, proceed at your own risk. Please visit the official link for Tenstorrent's instructions for downloading/configuring software at https://docs.tenstorrent.com/getting-started/README.html

sudo curl -sL https://raw.githubusercontent.com/cat768/tenstorrent-stack/main/tenstorrent-stack.sh | bash

Overview

Tenstorrent Stack is an automated installer script for the complete Tenstorrent software ecosystem on Ubuntu 22.04 LTS, inspired by Lambda Stack's approach to simplifying complex ML environment setup.

Setting up hardware accelerators for machine learning often involves multiple installation steps, managing dependencies, and considerable configuration. Tenstorrent Stack aims to reduce this complexity by providing a single script that handles the entire installation process.

What does Tenstorrent Stack install?

The script automates the installation of system prerequisites, kernel drivers, firmware, system tools, management utilities, and optionally the TT-Metal and TT-Forge SDKs for Tenstorrent hardware (Grayskull, Wormhole, Blackhole).

Key Features

Single Script Automation

Get the full Tenstorrent stack up and running with a single script that handles all installation phases.

Comprehensive Installation

Installs everything from kernel drivers to management tools and SDKs in the correct order with proper dependencies.

Version Pinning

Uses specific, tested versions of TT-KMD, firmware, and system tools to ensure compatibility and stability.

Modular Options

Choose whether to install the larger SDKs (TT-Metal/TT-NN and TT-Forge) based on your needs.

Interactive Process

The script guides you with prompts and confirms critical steps before proceeding.

Simplified Setup

What would normally take hours of manual work is reduced to running a single script with a few confirmations.

System Requirements

Installation Process

The installation process involves several steps that the script automates for you:

1

Initial Checks

The script verifies OS version, sudo access, and required commands (git, wget, python3, etc.).

2

System Prerequisites

Updates apt, installs dkms, and runs Tenstorrent's install_dependencies.sh.

3

Kernel Module (TT-KMD)

Clones specific version, installs via dkms, and loads the module.

4

Flash Utility & Firmware

Installs tt-flash via pip3, downloads specific firmware version, and attempts to flash.

First Reboot Required - The script will pause here and ask you to reboot.
5

HugePages Setup

Downloads & installs tenstorrent-tools .deb package and enables systemd services.

Second Reboot Required - The script will pause again and ask you to reboot.
6

Management Tools

Installs tt-smi via pip3 and verifies functionality. Optionally installs tt-topology.

7

Optional SDKs

If requested, installs TT-Metal/TT-NN (clones, builds, creates Python venv) and/or TT-Forge (clones only).

8

Final Instructions

Provides recap and next steps (activating venv, setting environment variables, building TT-Forge manually).

Running the Script

You can run the script directly from the repository:

curl -sL https://raw.githubusercontent.com/cat768/tenstorrent-stack/main/tenstorrent-stack.sh | bash

Or download first and then run:

wget https://raw.githubusercontent.com/cat768/tenstorrent-stack/main/tenstorrent-stack.sh
chmod +x tenstorrent-stack.sh
./tenstorrent-stack.sh

Important Warnings

Note: This is not an official script by Tenstorrent. This is a script that is fanmade, proceed at your own risk. Please visit the official link for Tenstorrent's instructions for downloading/configuring software at https://docs.tenstorrent.com/getting-started/README.html

System Modifications

This script makes significant system modifications including kernel modules, firmware, system packages, and system services. Always review the script before running it.

Two Reboots Required

The installation process requires two system reboots during execution. The script will pause and explicitly ask for your confirmation before proceeding.

Version Compatibility

The script uses hardcoded versions which may not be the latest. Always check the official Tenstorrent documentation for the most appropriate versions for your specific hardware and use case.

TT-Forge Manual Build Required

The script only clones the TT-Forge repository. You'll need to build it manually as a post-installation step.

Resources Required

Installation (especially TT-Metal build) requires significant disk space (~30GB+) and time. Ensure your system has adequate resources before starting.

Post-Installation Steps

After successful installation, there are a few manual steps required to complete your setup:

  1. Activate the TT-Metal Python Virtual Environment:
    cd ~/tt-metal && source venv/bin/activate
  2. Set Required Environment Variables:
    export TT_METAL_HOME=~/tt-metal
    export PYTHONPATH=$TT_METAL_HOME/tt_metal:$TT_METAL_HOME
    export ARCH_NAME="grayskull"  # or "wormhole" or "blackhole" based on your hardware
  3. Build TT-Forge (if installed):
    cd ~/tt-forge
    # Follow TT-Forge build instructions from Tenstorrent documentation
  4. Verify Installation:
    sudo tt-smi  # Should show your Tenstorrent devices

Consider adding the environment variables to your .bashrc or .zshrc for convenience.

Latest version: Loading... Loading...