In this guide, I will walk you through the process of running Chasm Scout in Season 0 using Digital Ocean. Please note that you should always refer to the Official Guide from Chasm Network for the most up-to-date information.

I’ve chosen Digital Ocean for two main reasons:

  • It’s easy to use, especially for those new to cloud services.
  • Unlike AWS or GCP, it doesn’t require going through a complex DevOps process.

While Digital Ocean may be more expensive than some alternatives, it offers a user-friendly experience that’s ideal for this guide. For those seeking more cost-effective options, platforms like Linode, Contabo, Google GCP, AWS or Microsoft Azure can also be considered.

This guide aims to provide a simple, step-by-step approach for those unfamiliar with Virtual Private Clouds (VPCs).

The guide is tested on both Mac and Ubuntu, Windows user might need to run this on WSL or Git Bash.

Step 1: Mint NFT to Get Scout ID and API Key Link to heading

Visit https://scout.chasm.net

Mint

You will obtained WEBHOOK_API_KEY and SCOUT_UID from here.

Step 2: Get Groq API Key Link to heading

Sign up for an account at Groq to get GROQ_API_KEY

Groq API Key

Step 3: Digital Ocean Link to heading

Sign up for an account on DigitalOcean

Digital Ocean

Sign up a DigitalOcean using my reflink https://m.do.co/c/6b801669b201 to get free $200 credit over 2 months validity!

Step 4: Create a Droplet Link to heading

According to the Onboarding guide, the minimum requirements are:

1 vCPU, 1GB RAM / 20GB Disk, Static IP

Digital Ocean Droplet Setup

Here’s a detailed guide on How to Create a Droplet by Digital Ocean.

Step 5: Setup Server Link to heading

Chasm Official Docs on setting up inference scout

Open up your terminal and run these commands.

I: SSH into the server Link to heading

ssh root@<IP>

Take note of the IP, it will be used later as WEBHOOK_URL.

II: Install Docker Link to heading

Install Docker on Ubuntu

# 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 "$VERSION_CODENAME") stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update

# Install Docker
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

III: Setup .env file Link to heading

Check your current directory, it should be in /root, if not then just call cd /root

pwd

Create a new .env file via Nano

mkdir ChasmNode && cd ChasmNode
nano .env

Copy the .env setup from Chasm Inference Scout Guide and paste it in your terminal. Then update the following env variables:

  • SCOUT_NAME: Your scout name
  • SCOUT_UID: From Step 1: Mint NFT
  • WEBHOOK_API_KEY: From Step 1: Mint NFT
  • WEBHOOK_URL: From Step 5: I: SSH, where the url should be http://<ip>:<PORT>
  • GROQ_API_KEY: From Step 2: Get Groq API Key
PORT=3001
LOGGER_LEVEL=debug

# Chasm
ORCHESTRATOR_URL=https://orchestrator.chasm.net
SCOUT_NAME=myscout
SCOUT_UID=
WEBHOOK_API_KEY=
# Scout Webhook Url, update based on your server's IP and Port
# e.g. http://123.123.123.123:3001/
WEBHOOK_URL=

# Chosen Provider (groq, openai)
PROVIDERS=groq
MODEL=gemma2-9b-it
GROQ_API_KEY=

# Optional
OPENROUTER_API_KEY=
OPENAI_API_KEY=

You can save the .env file and exit Nano via Ctrl + x (^X),Y, Enter

IV: Run the scout Link to heading

# Pull the code from DockerHub
docker pull chasmtech/chasm-scout
# Start the docker file
docker run -d --restart=always --env-file ./.env -p 3001:3001 --name scout chasmtech/chasm-scout

V: Verify Link to heading

  1. Test Server Response:
# Should get "OK" response
curl localhost:3001
  1. Test LLM
source ./.env
curl -X POST \
     -H "Content-Type: application/json" \
     -H "Authorization: Bearer $WEBHOOK_API_KEY" \
     -d '{"body":"{\"model\":\"gemma2-9b-it\",\"messages\":[{\"role\":\"system\",\"content\":\"You are a helpful assistant.\"}]}"}' \
     $WEBHOOK_URL
  1. Check https://scout.chasm.net

Scout Page

Note that it takes around 15 minutes for the scout to update to the latest state

Next Steps Link to heading

  1. Monitor Your Scout: Regularly check https://scout.chasm.net to ensure your Scout is running smoothly and processing requests.
  2. Stay Updated: Keep an eye on the official Chasm documentation for any updates or changes to the Scout requirements or configuration.
  3. Optimize Performance: Checkout the optimization guide to optimize your server setup for better performance.