To get started as a miner or validator, these are the common steps both a miner and validator have to go through.
The following guide is tailored for distributions utilizing APT as the package manager. Adjust the installation steps as per the requirements of your system.
We will utilize ~/opt directory as our preferred location in this guide.
Install PM2 (If not already installed)
cddojo/scripts/setup/./install_pm2.sh
Install Docker (If not already installed)
./install_docker.sh
Clone the project, set up and configure python virtual environment
# In this guide, we will utilize the ~/opt directory as our preferred location.cd~/opt# Clone the projectgitclonehttps://github.com/tensorplex-labs/dojo.gitcddojo/# Set up python virtual environment and pip packages# Here we use venv for managing python versionspython3-mvenvenvsourceenv/bin/activatepipinstall-e.# for developers, install the extraspipinstall-e".[dev]"
Activate the python virtual environment
source env/bin/activate
Create your wallets and register them to our subnet
# create your walletsbtcliwalletnew_coldkeybtcliwalletnew_hotkey# register your wallet to our subnet# Testnetbtclisregister--wallet.namecoldkey--wallet.hotkeyhotkey--netuid98--subtensor.networktest
Retrieve the API Key and Subscription Key with Dojo CLI
# Start the dojo cli tool# Upon starting the CLI it will ask if you wanna use the default path for bittensor wallets, which is `~/.bittensor/wallets/`.
# If you want to use a different path, please enter 'n' and then specify the path when prompted.dojo# TIP: During the whole process, you could actually use tab-completion to display the options, so you don't have to remember them all. Please TAB your way guys! 🙇♂️
# It should be prompting you to enter you coldkey and hotkey# After entering the coldkey and hotkey, you should be in the command line interface for dojo, please authenticate by running the following command.
# You should see a message saying "✅ Wallet coldkey name and hotkey name set successfully."authenticate# Afterwards, please generate an API Key with the following command.# You should see a message saying: "✅ All API keys: ['sk-<KEY>]". Displaying a list of your API Keys.api_keygenerate# Lastly, please generate a Subscription Key with the following command.# You should see a message saying: "✅ All Subscription keys: ['sk-<KEY>]". Displaying a list of your Subscription Keys.
subscription_keygenerate# :rocket: You should now have all the required keys, and be able to start mining.# Other commands available to the CLI:# You can always run the following command to get your current keys.api_keylistsubscription_keylist# You can also delete your keys with the following command.api_keydeletesubscription_keydelete
Create .env file
Please refer to the Official Links to double check any URLs.
# copy .env.miner.examplecp.env.miner.example.env# ENV's that needs to be filled for miners:DOJO_API_KEY="sk-<KEY>"# Please select oneDOJO_API_BASE_URL="https://dojo-api-testnet.tensorplex.ai"
Start the miner by running the following commands: