macOS

Spin up your node and participate in the swarm in a macOS environment.

Overview

This guide walks you through setting up RL Swarm on macOS.

RL Swarm can run on both Intel and Apple Silicon (M1, M2, or M3) Macs. On macOS, RL Swarm runs in CPU-only mode by default, as NVIDIA GPUs are not supported on this platform.

Prerequisites

Make sure your system meets the minimum requirements and that you also have any additional dependencies installed.

  • macOS Monterey (12.0) or newer

  • A 64-bit arm64 or x86 CPU with at least 32 GB RAM, or an officially supported NVIDIA GPU (3090, 4090, 5090, A100, H100)

  • Python 3.10+

  • Docker installed and configured

  • Stable internet connection

  • Git installed

Installing Dependencies

  1. To start, install Homebrew if you don’t already have it by running this command in Terminal:

/bin/bash -c $(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)
  1. Then, use Homebrew to install the required packages:

brew install python git docker
  1. Launch Docker Desktop after installation (you can find it in Applications). Once open, allow it to initialize and complete its setup process.

Configuring Docker

Make sure the Docker daemon is running before continuing.

Next, you'll want to allocate enough system memory to Docker. You can do this by going to Settings > Resources > Advanced > Memory Limit and setting the memory value to the highest available value.

To verify Docker is working correctly, run the following command in Terminal:

sudo docker run hello-world

If you see a success message, your installation is good to go.

Clone the RL Swarm Repository

  1. Navigate to your home directory and clone the RL Swarm GitHub repository using this command:

git clone https://github.com/gensyn-ai/rl-swarm.git
  1. Then move into the project folder:

cd rl-swarm

Run RL Swarm

You can now start RL Swarm using the following Docker command inside your terminal:

docker compose run –rm –build -Pit swarm-cpu

If you hit an error saying “docker-compose: command not found” use “docker compose” (without the hyphen), as this is the syntax used by modern Docker versions.

Log into RL Swarm

When you start RL Swarm, it will open a browser window automatically pointing to http://localhost:3000.

If the browser does not open automatically, navigate to that address manually.

You will see the RL Swarm login screen powered by Alchemy. From here, you can log in using your preferred method such as Google or email.

After login, a swarm.pem file will be created in your repository folder. This identifies your peer on the Gensyn Testnet.

Huggingface

If you would like to upload your model to Hugging Face, enter your Hugging Face access token when prompted. You can generate one from your Hugging Face account, under Access Tokens.

Verify your Node

Once you are logged in, your node will begin training automatically.

You can verify that your peer has successfully connected by visiting the Gensyn Testnet Dashboard. Your peer should appear in the active swarm list, and you can monitor training progress in real time.

Optional: Experimental Mode (No Docker)

If you want to experiment with the GenRL library or the configurable parameters, we recommend you run RL Swarm via shell script:

python3 -m venv .venv
source .venv/bin/activate
./run_rl_swarm.sh

This method gives you access to GenRL’s configuration parameters and experimental features.

To learn more about experimental mode, check out our getting started guide on Github.

Troubleshooting

Refer to the multi-platform RL Swarm Troubleshooting guide for unblocking information and fixes to common set-up issues.

Last updated