This guide provides a step-by-step process to deploy a Hugging Face model as a Worker Node within the Allora Network. By following these instructions, you will be able to integrate and run models from Hugging Face, contributing to the Allora decentralized machine intelligence ecosystem.
See complete walkthrough and instructions here.
- Website: allora website
- Telegram: Join allora discussion
- Twitter: Follow allora on Twitter
- GitHub: allora github
- Documentation: docs
| Component | Minimum Requirements |
|---|---|
| Operating System | Windows, macOS, or Linux |
| CPU | 1/2 core minimum |
| RAM | 2 to 4 GB |
| Storage | 5 GB SSD or NVMe |
-
Update and Upgrade Server: Ensure your server is up to date.
sudo apt update && sudo apt upgrade -y -
Install Required Packages: Install the necessary dependencies.
sudo apt install -y ca-certificates zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev curl git wget make jq build-essential pkg-config lsb-release libssl-dev libreadline-dev libffi-dev gcc screen unzip lz4
-
Install Docker: Use the following command to install Docker.
curl --proto '=https' --tlsv1.2 -sSfL https://raw.githubusercontent.com/Dedenwrg/dependencies/main/docker/docker.sh | sudo sh
-
Install Go: Remove any existing Go installation and install the latest version.
sudo rm -rf /usr/local/go curl -L https://go.dev/dl/go1.22.4.linux-amd64.tar.gz | sudo tar -xzf - -C /usr/local echo 'export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin' >> $HOME/.bash_profile echo 'export PATH=$PATH:$(go env GOPATH)/bin' >> $HOME/.bash_profile source $HOME/.bash_profile go version
-
Install Python & Pip: Install Python 3 and pip.
sudo apt install python3 python3 --version sudo apt install python3-pip pip3 --version
-
Clone the Repository and Build the Wallet:
git clone https://github.com/allora-network/allora-chain.git cd allora-chain && make all allorad version
-
Create a Wallet: Generate a new wallet and save the mnemonic phrase.
allorad keys add wallet
-
Import to Keplr: Import the mnemonic phrase into Keplr.
-
Connect to the Allora Dashboard: Use the Allora Dashboard with Keplr.
-
Add Allora Chain to Keplr: Use this link to add the Allora chain to Keplr.
-
Get Faucet Tokens: Obtain test tokens from the faucet.
-
Clone the Worker Repository:
cd $HOME git clone https://github.com/allora-network/allora-huggingface-walkthrough cd allora-huggingface-walkthrough
-
Prepare the Worker Directory:
mkdir -p worker-data chmod -R 777 worker-data
-
Configure Seed Phrase: Replace
SeedPhrasewith your wallet seed phrase.curl -O https://raw.githubusercontent.com/adanothe/allora-testnet/main/config.json SEED_PHRASE="SeedPhrase" sed -i "s/\"addressRestoreMnemonic\": \"[^\"]*\"/\"addressRestoreMnemonic\": \"$SEED_PHRASE\"/" config.json
-
Create Coingecko API Key:
-
Create a demo account on Coingecko.
-
Replace
APIKEYwith your Coingecko API key.
COINGECKO_API_KEY="APIKEY" sed -i "s/<Your Coingecko API key>/$COINGECKO_API_KEY/" app.py
-
-
Run Huggingface Worker:
chmod +x init.config ./init.config docker compose up -d --build
-
View Logs:
- Node Logs:
Add the following to your bash profile to easily view logs:
To view logs:
echo 'export WORKER_COMPOSE="$HOME/allora-huggingface-walkthrough/docker-compose.yaml"' >> ~/.bashrc source ~/.bashrc
docker compose logs -f --tail=100
- Node Logs:
Add the following to your bash profile to easily view logs:
To test the inference model only:
-
. Send requests to the inference model. For example, request ETH price inferences:
curl http://127.0.0.1:8000/inference/ETH
Expected response:
{"value":"2564.021586281073"}
You'll receive points on the Allora Dashboard within the next few hours.
- Telegram: Join the discussion
- Twitter: Follow us on Twitter
- GitHub: View our repositories
- Documentation: docs