Docker Method
This guide is quoted from https://docs.aldebaranode.xyz/guide/testnet/cortensor/installation
All rights reserved to Aldebaranode
Prerequisites
Ensure that you meet the hardware requirements to run the Cortensor network. For detailed information, you can visit the official website.
Step 1 - Install Docker
Run the following command to uninstall all conflicting packages:
for pkg in docker.io docker-doc docker-compose docker-compose-v2 podman-docker containerd runc; do sudo apt-get remove $pkg; done
Set up Docker’s apt repository.
# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
# Add the repository to Apt sources:
echo \ "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \ $(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
Install the Docker packages.
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y
Step 2 - Clone Installer Repository
Install Git to clone the installer repository.
sudo apt-get install git -y
git clone https://github.com/CryptoNodeID/cortensor-docker.git && cd cortensor-docker
Step 3 - Config Docker Compose
Run the build.sh script. The script will do the following:
Build the Dockerfile for the Cortensor image
Generate the docker-compose.yaml file for you to adjust your total nodes
bash build.sh
After the docker-compose.yml and .env files are generated, you need to modify the environment variables in .env file for the cortensor section:
RPC_URL: Your ARB Sepolia RPC URL, which you can obtain by running your own node or using a service provider like Ankr, Alchemy, or Infura.
ETH_RPC_URL: Your ETH Mainnet RPC URL, you can use any free provider
CONTRACT_ADDRESS_RUNTIME: DevNet#5 Runtime is
0x8361E7821bDAD7F8F0aC7862Bebb190B8Da1A160
NODE_PUBLIC_KEY_X: The EVM address of your miner node.
NODE_PRIVATE_KEY_X: The EVM private key of your miner node.
X means number of your node. If you're going to run 5 nodes, there will be
NODE_PUBLIC_KEY_1=0x... NODE_PRIVATE_KEY_1=0x... NODE_PUBLIC_KEY_2=0x... NODE_PRIVATE_KEY_2=0x... ... NODE_PUBLIC_KEY_5=0x... NODE_PRIVATE_KEY_5=0x...
Step 4 - Run the Nodes
Ensure that the working directory is within the installer folder.
Run your nodes using this command
docker compose up -d
Run this command to check all the container logs
docker compose logs --tail 100 -f
Run this command to stop the nodes
docker compose down
Run this command to delete all nodes
docker compose rm
Update Instruction
You can simply run below command inside the working directory to get latest update
For DevNet#5 onwards
git pull
bash upgrade.sh
For DevNet#4 and below, it's recommended to do full rebuild
git pull
bash build.sh
Last updated
Was this helpful?