Skip to content

The0xLedger/Gensyn_Node_Oracle_Guide

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 

Repository files navigation

💻 Guide to Run Gensyn Node for Lifetime on Oracle 💻

The Gensyn Protocol is a layer-1 trustless protocol for deep learning computation that directly and immediately rewards supply-side participants for pledging their compute time to the network and performing ML tasks. The project has raised $50M funding from investors such as Andreessen Horowitz, Galaxy, Eden Block, 7percent Ventures and others.

image

First You will need an SSH client to build connection with our Oracle Virtual Machine (VM)

image

Now, Get SSH-Key From Termius. Follow The Steps in Images👇

  • Click on Keychain.

image

  • Click on Generate Key.

image

  • Fill the details.

image

  • Copy Public Key. It's your SSH key.
  • Replace "Generated by Termius" from it with "oracle"
  • It will look like👇
  • ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDPx3HFW0j0FAtyWCRff7aU11/g10EdFWyFGT1m/14lcdmeDP6Sq5bMMocWPgkp9E7cjII3+/miStSjq7MplIPaBQKaF6EPg34NQaj/Nl8IyzawiRu21dc3vOVWBwlR8Xc33htxZZnoB0OmDBYi+fKmOfvazOqFyVKq86WOoH1gtc6d1A1o4rPWzPaf7N5zKASsmLkWDTgntnR75vWfQSodAvzh+NuHxXnHCeZuJ1CZNzmldur5Fn9YouADqpgoRydtvE56yKIgGtrBYpcVqROe+kIXXQLlO1O/bG0UrPOeCjW2VtM/2lljXIMJkQt79RKtxsHzq9 oracle

image

Now, Signup on Oracle for Free Tier Virtual Machine

  • Signup on Oracle https://www.oracle.com/in/cloud/free/ and verify the signup process via your VISA Debit Card or Credit Card.
  • It will take 24-48 hours to get your oracle account verified for use.
  • When your oracle account gets verified. Log in on oracle website.

image

Create free tier lifetime virtual machine. Follow The Steps in Images👇

  • Click on Create a VM Instance.

image

  • Fill name as "oracle"

image

  • Select Ubuntu Operating System and Shape as Ampere.
  • Select 4 OCPU and 24 GB Memory.
  • ⚠️ If you go beyond this limit it will cost you real money.

image

  • Click on create new virtual cloud network.

image

  • Paste your SSH key here which you created earlier on termius

image

  • Enter boot volume size upto 200 GB.
  • ⚠️ If you go beyond this limit it will cost you real money.
  • Click Next, Review and Create VM.

image

  • After Creating VM copy your Public IP.

image

Connect Oracle Virtual Machine with Termius. Follow The Steps in Images👇

  • Click on Host and select new host.

image

  • Fill Public IP, Label & Credentials and click on connect.

image

  • You are connected with your lifetime free Virtual machine.

image

Run these commands below in sequence to setup your gensyn node 👇

Install Python and Other Tools

sudo apt update && sudo apt install -y python3 python3-venv python3-pip curl wget screen git lsof
  • Check Version
python3 --version

Install Node.js , npm & yarn

curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - && sudo apt update && sudo apt install -y nodejs
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list >/dev/null
sudo apt update && sudo apt install -y yarn
  • Check version
node -v
npm -v
yarn -v
git clone https://github.com/gensyn-ai/rl-swarm.git
  • If you have an old swarm.pem file. Copy your existing swarm.pem file in rl-swarm folder on your Oracle VPS storage.
  • Otherwise, Just follow next commands for fresh node setup.

Install Screen & Start The Node

sudo apt install screen -y
screen -S gensyn
cd rl-swarm
python3 -m venv .venv
source .venv/bin/activate
./run_rl_swarm.sh

Open A New Terminal Window On VPS and Follow Next Commands.

sudo apt install ufw -y
sudo ufw allow 22
sudo ufw allow 3000/tcp
sudo ufw enable
wget -q https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-arm64.deb
sudo dpkg -i cloudflared-linux-arm64.deb
cloudflared --version
cloudflared tunnel --url http://localhost:3000

Follow These Properly👇

  • Now connect your email on gensyn by clicking on generated link with (ctrl + click). After connecting email on gensyn website go to First Terminal Window.
  • Now It will promt Would you like to push models you train in the RL swarm to the Hugging Face Hub? [y/N] Enter N
  • Now It will promt >> Enter the name of the model you want to use in huggingface repo/name format, or press [Enter] to use the default model. press Enter & get defalut model:
  • Now It will promt >> Would you like your model to participate in the AI Prediction Market? [Y/n] Enter Y
  • Now, Your node is running properly. Detach or exit the screen with (Ctrl + A + D).

Now, Take the Swarm Role in Gensyn Discord

  • Follow these commands👇
screen -S gensyn-swarm
cd ~
wget https://go.dev/dl/go1.24.0.linux-arm64.tar.gz
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf go1.24.0.linux-arm64.tar.gz
echo 'export PATH=$PATH:/usr/local/go/bin' >> ~/.bashrc
echo 'export GOPATH=$HOME/go' >> ~/.bashrc
echo 'export PATH=$PATH:$GOPATH/bin' >> ~/.bashrc
source ~/.bashrc
  • Check Version
go version
go install github.com/Deep-Commit/gswarm/cmd/gswarm@latest
  • Check Version
gswarm --version
gswarm
  • It will Prompt for Telegram bot token, Chat ID, EOA address.

🤖 Create Telegram Bot (Step-by-Step)

{ "ok": true, "result": [ { "message": { "message_id": 2021, "from": { "id": 123456789, "is_bot": false, "first_name": "GSwarm", "username": "gswarm_user", "language_code": "en" }, "chat": { "id": 123456789, "first_name": "GSwarm", "username": "gswarm_user", "type": "private" }, "date": 1704067200, "text": "Hello bot!" } } ] }

  • Extract the Chat ID: Look for the "chat":{"id":123456789} field.
  • For EOA Address Visit: https://dashboard.gensyn.ai/ and sign in with the email used during running the node.

image

  • Now, Exit Screen using (Ctrl + A + D)

Linking Discord and Telegram

  • To link your Discord and Telegram accounts:
  • Go to Gensyn Discord https://discord.com/invite/gensyn (swarm-link channel)
  • Type "/link-telegram" (this gives you a code)
  • Now, Go to Your Telegram Bot
  • Type "/verify code" (replace "code" with the code you received)
  • This will link your Discord and Telegram accounts for seamless integration.
  • You got the swarm role too👍

Commands to check Gensyn Node Status in Future.

screen -r gensyn
  • Exit the screen with (Ctrl + A + D).

About

https://x.com/The0xLedger

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published