Windows (WSL 2)

Spin up your node and participate in the swarm in a Windows (WSL 2) environment.

Overview

This guide walks you through setting up RL Swarm on Windows using WSL 2 (Windows Subsystem for Linux).

This allows you to run a native Linux environment compatible with Docker and Python, ensuring consistent results across platforms.

Prerequisites

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

  • A WSL 2 environment

  • 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 WSL 2

  1. Open PowerShell as Administrator.

  2. Install WSL using the following command:

wsl --install
  1. Restart your computer when prompted.

  2. After reboot, open the Microsoft Store and install Ubuntu.

  3. Launch Ubuntu and set up a username and password when prompted.

Installing Dependencies

Once your Ubuntu environment is installed and open, install the required system dependencies.

Run the following commands one at a time to install Python, Docker, Git, and supporting packages:

sudo apt update
sudo apt install -y python3 python3-venv python3-pip curl wget git docker.io build-essential

Docker

Make sure you have Docker installed and the Docker daemon is running on your machine. To do that, follow these instructions according to your OS. Make sure you allot sufficient memory to the Docker containers.

For example, if you are using Docker Desktop, this can be done by going to Docker Desktop Settings > Resources > Advanced > Memory Limit, and increasing it to the maximum possible value.

If you installed Docker via the command line, you can start it and spin up containers by running:

sudo service docker start

Clone the RL Swarm Repository

  1. Navigate to your home directory in your WSL 2 environment 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

WSL paths differ from Windows (e.g., /home/user vs C:\Users\). Make sure to double-check all filepaths if you're not copy-pasting from this guide.

Run RL Swarm

Depending on your hardware, you can run RL Swarm in either CPU or GPU mode.

For CPU-only setup (the default on most Windows machines):

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

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