Skip to main content

Register a Node - Windows (WSL)

Prerequisites

The ZerNet client has been built and tested on Ubuntu 22.04 and Ubuntu 24.04. While it may work on WSL-Ubuntu, it is not officially supported at this time.

1. Ensure NVIDIA GPU Drivers Are Installed

Ensure you have an NVIDIA GPU with the appropriate drivers installed. You can check if your NVIDIA GPU is recognized by running:

nvidia-smi

The nvidia-smi command is included with the NVIDIA display drivers. You can find the latest drivers on the NVIDIA Drivers page.

2. Ensure NVIDIA CUDA Toolkit Is Installed

Ensure you have the NVIDIA CUDA Toolkit installed. You can check if it is installed by running:

nvcc --version

If the nvcc command is not found, you can install the NVIDIA CUDA Toolkit by following the instructions on the NVIDIA CUDA Toolkit page.

You can learn more about NVIDIA CUDA support for WSL in the CUDA on WSL User Guide.

Installation

The process of registering a Node on Windows involves using the Windows Subsystem for Linux (WSL) to run Ubuntu. This guide will walk you through the steps to set up WSL, install Docker and the NVIDIA Container Toolkit, and register your ZerNet instance.

1. Install Ubuntu on Windows using WSL

  1. Open PowerShell as Administrator
  2. Run the following command:
    wsl --install
  3. Follow the prompts to complete the installation and set up a root user in WSL Ubuntu

2. Install Docker

Once inside the WSL Ubuntu instance, execute the following commands in order:

  1. Add Docker's GPG Key
    curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
  2. Adjust Permissions
    sudo chmod a+r /etc/apt/keyrings/docker.gpg
  3. Add Docker Repository
    echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
    $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
  4. Update Package Lists
    sudo apt-get update
  5. Install Docker
    sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

3. Install NVIDIA Container Toolkit

  1. Add NVIDIA Container Toolkit Repository
    curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg && \
    curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | \
    sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \
    sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list && \
    sudo apt-get update
  2. Install NVIDIA Toolkit
    sudo apt-get install -y nvidia-container-toolkit
  3. Configure NVIDIA Runtime
    sudo nvidia-ctk runtime configure --runtime=docker \
    && sudo systemctl restart docker \
    && sudo nvidia-ctk runtime configure --runtime=containerd \
    && sudo systemctl restart containerd

To check if the NVIDIA Container Toolkit is installed correctly, run:

sudo docker run --rm --runtime=nvidia --gpus all ubuntu nvidia-smi

It is also recommended to install the appropriate libnvidia-gl package for your driver version. For example, with NVIDIA driver version 550, you can run:

sudo apt-get install -y libnvidia-gl-550

You can find a list of available libnvidia-gl packages by running:

apt-cache search --names-only "libnvidia-gl*"

4. Register and Start ZerNet

  1. Locate the zerNet file in your Windows file system
  2. In Ubuntu, navigate to the directory where zerNet is stored:
    cd /mnt/c/yourzerNetfolder
  3. Use your Render Compute API Key public_key and secret_key to register your machine:
    ./zerNet --register --pubkey pk_my_public_key_123 --secretkey sk_my_secret_key_123
  4. Start zerNet using the registered keys:
    ./zerNet --pubkey pk_my_public_key_123 --secretkey sk_my_secret_key_123

Configuration

Disk Quota

You can pass the --quota flag to set a limit (in GB) on how much disk space the ZerNet client should be allowed to use for Docker images. You should set this to a value that still allows for some headroom on whichever drive your docker data-root is on.

For example, if your Docker data-root is on a 500GB drive, you might use --quota 250 to set the quota to 250GB. If it's on a 1TB drive, you might use --quota 500 to set the quota to 500GB. This way you still have some additional disk space headroom, since Docker consumes disk space for things other than just images. The default value is 200GB.

To find where your docker data-root is, run:

sudo docker info -f '{{ .DockerRootDir}}'