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.
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 📑
- Clone the repository into your local machine by running the following command:
git clone https://github.com/GraphiteAI/Graphite-Subnet.git
- Navigate into the directory you just cloned by running:
cd Graphite-Subnet
Tip
Creating a virtual environment is highly recommended to avoid conflicts with other Python projects.
- 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>
- Activate the virtual environment by running:
source <your_environment_name>/bin/activate
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.
- 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
- Verify your installation by running:
pm2 --version
- Disable the
pip
cache:
export PIP_NO_CACHE_DIR=1
- Install the dependencies by running:
pip install -r requirements.txt
- Create a local and editable installation:
pip install -e .
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.
- To create a new coldkey:
btcli wallet new_coldkey --wallet.name <your_wallet_name>
- 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
Note
For those that just created their wallets in the previous step, ignore this section and proceed here instead.
- Regenerate your coldkey:
btcli wallet regen_coldkey --wallet.name <your_wallet_name> --mnemonic <your_mnemonic>
- Regenerate your hotkey:
btcli wallet regen_hotkey --wallet.name <your_wallet_name> --wallet.hotkey <your_hotkey_name> --mnemonic <your_mnemonic>
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)
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
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.
Now that you're all equipped with the necessary tools, you can choose to either: