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.
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
- Operating System: Ubuntu 22.04 LTS (script checks for this)
- Hardware: Compatible Tenstorrent device (Grayskull, Wormhole, or Blackhole)
- Disk Space: At least 30GB+ free space (especially for TT-Metal build)
- Prerequisites: git, wget, python3 (script checks for these)
- Permissions: sudo access required
- Internet Connection: Required to download components
Installation Process
The installation process involves several steps that the script automates for you:
Initial Checks
The script verifies OS version, sudo access, and required commands (git, wget, python3, etc.).
System Prerequisites
Updates apt, installs dkms, and runs Tenstorrent's install_dependencies.sh.
Kernel Module (TT-KMD)
Clones specific version, installs via dkms, and loads the module.
Flash Utility & Firmware
Installs tt-flash via pip3, downloads specific firmware version, and attempts to flash.
HugePages Setup
Downloads & installs tenstorrent-tools .deb package and enables systemd services.
Management Tools
Installs tt-smi via pip3 and verifies functionality. Optionally installs tt-topology.
Optional SDKs
If requested, installs TT-Metal/TT-NN (clones, builds, creates Python venv) and/or TT-Forge (clones only).
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:
- Activate the TT-Metal Python Virtual Environment:
cd ~/tt-metal && source venv/bin/activate - 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 - Build TT-Forge (if installed):
cd ~/tt-forge # Follow TT-Forge build instructions from Tenstorrent documentation - Verify Installation:
sudo tt-smi # Should show your Tenstorrent devices
Consider adding the environment variables to your .bashrc or .zshrc for convenience.