---
description: >-
  Training Node Guide - Start Participating Early to Gain an Edge When the
  Competition Starts
---

# Flock - Training Node

<figure><img src="https://3139776549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyvRCbbFgJCK9BXKOuQxS%2Fuploads%2F2kB5Sv6R2yxrPpUa0Tzk%2Fimage.png?alt=media&#x26;token=f33e04c1-2740-4d42-a4ea-9f47920e8ff3" alt=""><figcaption></figcaption></figure>

**1. Prerequisites and Setup**

* **Wallet:** Use MetaMask.
* **Network:** Base Sepolia.
* **Recommendation:** Use a new wallet or a testnet wallet to avoid risks with mainnet assets.

***

**2. Verify GitHub and Claim $FML Tokens**

* Go to **GitHub** and verify your account.
* After verification, **claim $FML tokens**.

**3. Stake Your Tokens**

1. Go to [Stake-to-Earn](https://train.flock.io/stake-to-earn).
2. Search for **cryptonode3** or address **0xe0a9ac439135dfadd0c1502d6d12c38f272d8102**.
3. Stake your **$FML tokens** to participate.

<figure><img src="https://3139776549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyvRCbbFgJCK9BXKOuQxS%2Fuploads%2FAZyvl0mqTfu3UgTeTjw3%2Fimage.png?alt=media&#x26;token=368dc01b-65ad-4c8c-8ca7-577b82bd001a" alt=""><figcaption></figcaption></figure>

***

**4. Get Your API Key**

*   In the Stake-to-Earn dashboard, click the dropdown at the top left corner to get your **API Key**.

    > This API key will be used in later steps, so keep it safe.



<figure><img src="https://3139776549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyvRCbbFgJCK9BXKOuQxS%2Fuploads%2FKcHDLcjhuAQxKu74joUu%2Fimage.png?alt=media&#x26;token=12c2c99f-855a-4848-aac4-61a8e1b8af57" alt=""><figcaption></figcaption></figure>

***

**5. Create a Token on Hugging Face**

* Register on **Hugging Face** using your GitHub or Google account: [Hugging Face Tokens](https://huggingface.co/settings/tokens).
* In **Settings**, create a token named **"Flock"**.
* Save both your **Hugging Face token** and **username**.

<figure><img src="https://3139776549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyvRCbbFgJCK9BXKOuQxS%2Fuploads%2FioGoD5p0PWiaQPmThLyM%2Fimage.png?alt=media&#x26;token=8196e2e9-8fa0-4e82-b340-44607b846b0f" alt=""><figcaption></figcaption></figure>

***

#### **6. Set Up Your Environment**

**Windows Users: Install WSL**

* Follow the [Windows Subsystem for Linux installation guide](https://docs.flock.io/flock-products/ai-arena/quickstart/pre-requisites/wsl-installation) from Flock.

**Linux Users: Install Miniconda**

1.  **Download the Miniconda installer**:

    ```bash
    wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
    ```
2.  **Run the installer**:

    ```bash
    bash Miniconda3-latest-Linux-x86_64.sh
    ```
3.  **Add Conda to Shell** (Current Session):

    ```bash
    eval "$(/root/miniconda3/bin/conda shell.bash hook)"
    ```
4.  **Permanently Initialize Conda**:

    ```bash
    conda init
    ```

    *   Restart your terminal or source it:

        ```bash
        source ~/.bashrc
        ```
5.  **Verify Conda Installation**:

    ```bash
    conda --version
    ```

***

#### **7. Clone the Training Node Quickstart Repository**

*   Clone the repository that contains the setup script:

    ```bash
    git clone https://github.com/FLock-io/testnet-training-node-quickstart.git
    ```
*   Enter the project directory and install packages:

    ```bash
    conda create -n training-node python==3.10
    conda activate training-node
    pip install -r requirements.txt
    ```

***

#### **8. Select Your Task ID**

* View available tasks and choose one from [Flock Tasks](https://train.flock.io/tasks).

***

#### **9. Run the Full Automation Script**

Use your API key, task ID, Hugging Face token, and username to start training your node.

**Linux Command:**

```bash
TASK_ID=<task-id> FLOCK_API_KEY="<your-flock-api-key>" HF_TOKEN="<your-hf-token>" CUDA_VISIBLE_DEVICES=0 HF_USERNAME="<your-hf-username>" python full_automation.py
```

<figure><img src="https://3139776549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyvRCbbFgJCK9BXKOuQxS%2Fuploads%2Fzn45F6e539iaKXVNyvuR%2Fimage.png?alt=media&#x26;token=50c9dad4-fd1d-458d-8552-b06f6eedf6b1" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3139776549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyvRCbbFgJCK9BXKOuQxS%2Fuploads%2FKQjvqSQqYdieGjUKf0XH%2Fimage.png?alt=media&#x26;token=5b530da0-dc1d-4ae1-8e1f-330bd8e8f02b" alt=""><figcaption></figcaption></figure>

**Windows Command (PowerShell):**

```powershell
$env:TASK_ID = "<task-id>"
$env:FLOCK_API_KEY = "<your-flock-api-key>"
$env:HF_TOKEN = "<your-hf-token>"
$env:CUDA_VISIBLE_DEVICES = "0"
$env:HF_USERNAME = "<your-hf-username>"
python full_automation.py
```

***

#### **10. Check Node Status**

Once your training node participates in AI model validation, it will appear on the [Stake-to-Earn Dashboard](https://train.flock.io/stake-to-earn).

***

**Additional Resources**

* [Official Documentation](https://docs.flock.io/flock-products/ai-arena/quickstart/training-node-guide) for further details.

***
