# Gensyn Testnet Node CPU

1\. **Update System Packages**

```
sudo apt-get update && sudo apt-get upgrade -y
```

### 2. **Install General Utilities and Tools** <a href="#id-2373" id="id-2373"></a>

```
sudo apt install screen curl iptables build-essential git wget lz4 jq make gcc nano automake autoconf tmux htop nvme-cli libgbm1 pkg-config libssl-dev libleveldb-dev tar clang bsdmainutils ncdu unzip libleveldb-dev  -y
```

### 3. **Install Python** <a href="#fe5f" id="fe5f"></a>

```
sudo apt-get install python3 python3-pip
sudo apt install python3.10-venv
```

### 4. **Install Node** <a href="#id-0829" id="id-0829"></a>

```
sudo apt-get update
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt-get install -y nodejs
sudo npm install -g yarn
```

### 5. **Install Yarn** <a href="#id-7d68" id="id-7d68"></a>

```
curl -o- -L https://yarnpkg.com/install.sh | sh
export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
source ~/.bashrc
```

### 6. Swap <a href="#id-6.-clone-the-repository" id="id-6.-clone-the-repository"></a>

```
sudo swapoff /swapfile
sudo rm /swapfile
sudo dd if=/dev/zero of=/swapfile bs=1M count=16384
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
```

### 7. Clone the Repository

```
git clone https://github.com/gensyn-ai/rl-swarm/
cd rl-swarm
```

Open a screen to run it in background

```
screen -S swarm
```

Install swarm

```
cd $HOME/rl-swarm && python3 -m venv .venv && . .venv/bin/activate && git pull
CUDA_VISIBLE_DEVICES="" CPU_ONLY=1 bash run_rl_swarm.sh
```

Press `Y`

* It will show like this :thumbsup:

<figure><img src="https://4035067140-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC9MoDmPzf2bJhCnlF4JC%2Fuploads%2FYLW7m2IAc5tBz94spPcD%2Fimage.png?alt=media&#x26;token=8f1aca98-1001-4d43-beb4-befe97ef84b9" alt=""><figcaption></figcaption></figure>

You need to visit the URL which you will find on your terminal there and then, log in using your email. After logging in, it will display something like this

<figure><img src="https://4035067140-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC9MoDmPzf2bJhCnlF4JC%2Fuploads%2FUmwphqm6Y7H2HXz0Ioh5%2Fimage.png?alt=media&#x26;token=a0239a65-92b3-4179-8235-f7c556808319" alt=""><figcaption></figcaption></figure>

* It will ask you this question : `Would you like to push models you train in the RL swarm to the Hugging Face Hub? [y/N]` ; You should write `N` there
* You will see something like this; it indicates that everything is working fine. You can now detach from this screen session.

<figure><img src="https://4035067140-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC9MoDmPzf2bJhCnlF4JC%2Fuploads%2Fbr1kmQYHtxnVVZLPg2JY%2Fimage.png?alt=media&#x26;token=8a6ba663-6bcb-430e-bf34-acf4af741269" alt=""><figcaption></figcaption></figure>

### **8. Detach from `screen session`**

* Use `Ctrl + A` and then press `D` to detach from this screen session.

### ⚠️ OTP Issue / URL not accessible :

* If you can't get OTP in your email and also can't login using google, then use this method :
* Install ngrok in different tab on the same vps ( don't close previous tab where gensyn is running)

```
wget https://bin.equinox.io/c/bNyj1mQVY4c/ngrok-v3-stable-linux-amd64.tgz && tar -xvzf ngrok-v3-stable-linux-amd64.tgz && sudo mv ngrok /usr/local/bin/
```

* Now visit : <https://ngrok.com/>
* Sign up using email
* Now go to `Your authtoken` section and then click on "show authtoken" option and then copy that command
* Now open your VPS in other tab and paste the command
* Now use this command `ngrok http 3000`
* Then click on the following url with ngrok domain and then access gynsyn page and login using email address (✅ working, tested)
