Skip to content

Latest commit

 

History

History
251 lines (164 loc) · 6.43 KB

installation.md

File metadata and controls

251 lines (164 loc) · 6.43 KB

Bittensor Installation Guide 🚀

Welcome to the basic installation guide! This document will walk you through the steps to install the files you need on your local machine to get you ready to mine or validate on Graphite, right from scratch.


Table of Contents 📑

  1. Requirements 📋
  2. Installation 🔧
    1. Clone the repository 📂
    2. Enter the directory ➡️
    3. Set up a virtual environment (optional) 🌐
    4. Install PM2 (optional) 📦
    5. Install the dependencies 📦
    6. Create your wallets 👝
    7. Regenerate your wallets 🔄
  3. Post-Installation Verification
  4. Registration 📝
  5. Troubleshooting 🛠️

Requirements 📋

Before installing Bittensor, ensure you have the following requirements:

  • Python 3.10 or 3.11 🐍
  • pip (Python package installer) 📦
  • git 🛠️
  • Met all other requirements specified in min_compute.yml 📑

Installation 🔧

Clone the repository 📂

  1. Clone the repository into your local machine by running the following command:
git clone https://github.com/GraphiteAI/Graphite-Subnet.git

Enter the directory ➡️

  1. Navigate into the directory you just cloned by running:
cd Graphite-Subnet

Set up a virtual environment (optional) 🌐

Tip

Creating a virtual environment is highly recommended to avoid conflicts with other Python projects.

  1. Create a virtual environment by running one of the following commands with your preferred Python version:
python3.10 -m venv <your_environment_name>
python3.11 -m venv <your_environment_name>
  1. Activate the virtual environment by running:
source <your_environment_name>/bin/activate

Install PM2 (optional) 📦

Tip

PM2 is a process manager for Node.js applications. It allows you to keep your application alive forever, to reload it without downtime, and to manage application logs.

  1. Install PM2 by running:

Linux:

sudo apt update && sudo apt install npm && sudo npm install pm2 -g && pm2 update

MacOS:

brew update && brew install npm && sudo npm install pm2 -g && pm2 update
  1. Verify your installation by running:
pm2 --version

Install the dependencies 📦

  1. Disable the pip cache:
export PIP_NO_CACHE_DIR=1
  1. Install the dependencies by running:
pip install -r requirements.txt
  1. Create a local and editable installation:
pip install -e .

Create your wallets 👝

Note

For those that already have wallets, and are unsure on how to regenerate them, skip this section and head here instead.
If your wallets are all set up, you can proceed to Post-Installation Verification.

  1. To create a new coldkey:
btcli wallet new_coldkey --wallet.name <your_wallet_name>
  1. To create a new hotkey:
btcli wallet new_hotkey --wallet.name <your_existing_coldkey_name> --wallet.hotkey <your_hotkey_name>

An example of creating a new coldkey and hotkey would be:

btcli wallet new_coldkey --wallet.name coldkey1
btcli wallet new_hotkey --wallet.name coldkey1 --wallet.hotkey hotkey1

Regenerate your wallets 🔄

Note

For those that just created their wallets in the previous step, ignore this section and proceed here instead.

  1. Regenerate your coldkey:
btcli wallet regen_coldkey --wallet.name <your_wallet_name> --mnemonic <your_mnemonic>
  1. Regenerate your hotkey:
btcli wallet regen_hotkey --wallet.name <your_wallet_name> --wallet.hotkey <your_hotkey_name> --mnemonic <your_mnemonic>

Post-Installation Verification ✅

To verify that your wallets are created, you can run:

btcli wallet list

If you receive a prompt for the wallets path, it is most likely in the default path, so just enter the default input by pressing Enter or Return.

In any case, if you have it stored in a separate path, do specify the path when prompted or with the --wallet.path flag.

If installed correctly, this should display all the coldkeys and their respective hotkeys.

It should look something like this:

Wallets
├──
│   guide_validator (5DtJYgMRevSFVdavGqoYrM4P6Bbk1ifoiwop6mt1ikX6Y5Nq)
│   └── hotkey (5FeVAsVkzgmYsHLeRahUh1PUZwKCYdyBCSWH1YTFfRw7UV3y)
└──
    guide_miner (5FC8U6TSX2C5HKbk1kRizgPFAWJLiRKJnycXPUQv7MZzmn9T)
    └── hotkey (5EhoFzbSgnAK5KGt6Zs44v737wdzoya58frzNnqvP6abQ4bF)

Registration 📝

Note

Ensure that you have sufficient funds in your wallet to register your wallets onto the subnet. To receive testnet TAO, you can request some from the Community Moderators in the Bittensor Discord.

Tip

Graphite is Subnet 43 on the mainnet and Subnet 65 on the testnet.

To register your wallets onto the subnet, you can run:

Mainnet

btcli subnet register --wallet.name <your_wallet_name> --wallet.hotkey <your_hotkey_name> --netuid 43

Testnet

btcli subnet register --wallet.name <your_wallet_name> --wallet.hotkey <your_hotkey_name> --netuid 65 --subtensor.network test

Troubleshooting 🛠️

If you encounter issues during installation:

  • Ensure your Python and pip versions are up to date.
  • Create a virtual environment with the suitable Python versions to avoid conflicts with other Python projects.
  • Reach out to the Graphite team on Discord for further assistance.

With that, you're all set! 🚀

Now that you're all equipped with the necessary tools, you can choose to either: