How to Set Up a Nosana Node for GPU Computing A Comprehensive Guide

Tutorials4个月前发布 easygpus
41 0

How to Set Up a Nosana Node for GPU Computing: A Comprehensive Guide

In this tutorial, we'll walk you through the process of setting up a Nosana node for GPU computing. Nosana is a decentralized network that allows you to utilize your GPU for computational tasks. By following this guide, you'll be able to join the Nosana test grid and potentially participate in the network.

1. Prerequisites

Before we begin, make sure you have:

  • Ubuntu version 20.04 or higher
  • Docker installed and configured properly
  • Appropriate permissions to run Docker without root

You can check your Ubuntu version by running:

lsb_release -a

For detailed instructions on installing and configuring Docker, refer to these resources:

2. Installing NVIDIA Drivers

To fully utilize GPUs on the grid, we need to install both NVIDIA drivers and NVIDIA's CUDA toolkit.

Follow these steps to install NVIDIA drivers:

  1. Visit the NVIDIA official website or use this guide to download the correct driver for your system.
  2. Run the installer and follow the provided instructions.
  3. After installation, verify the driver installation by running:
nvidia-smi
  1. If the command displays correct driver information, the installation was successful. If not, try reinstalling the driver or seek further assistance.

3. Setting Up NVIDIA Container Toolkit

To install the NVIDIA Container Toolkit (nvidia-ctk), run the following commands:

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

sudo apt-get install -y nvidia-container-toolkit

Next, configure the NVIDIA Container Toolkit for Docker:

sudo nvidia-ctk runtime configure --runtime=docker
sudo systemctl restart docker

4. Running the Nosana Test Grid Script

To set up a Nosana node on your computer, run the following command:

bash <(wget -qO- https://nosana.io/register.sh)

Note: This script is designed to run without sudo privileges. Always exercise caution when running scripts from the internet with sudo privileges. It's recommended to thoroughly examine the script before executing it on your system. You can view the script here.

The script will perform a series of tests to verify that the previous steps were completed successfully. You'll see your node's information displayed in the following format:

  _   _                             
 |  | | ___  ___  __ _ _ __   __ _ 
 |  | |/ _ / __|/ _` | '_  / _` |
 | |  | (_) __  (_| | | | | (_| |      
 |_| _|___/|___/__,_|_| |_|__,_|

Reading keypair from ~/.nosana/nosana_key.json

Network:    mainnet
Wallet:    <NODE_ADDRESS>
SOL balance: 0E-9 SOL
NOS balance: 0 NOS
Provider:    podman

During the registration process, you'll be asked for some information, including your email, Discord handle, and optionally, your Twitter/X handle. After providing this information and agreeing to the terms and conditions, a benchmark test will begin to check your node's hardware.

If the benchmark is successful, you'll see the following output:

Benchmark finished
================================
Thank you for registering for Nosana Node. 
We'll review your registration and you will get an email from us if you are selected.

Congratulations! 🎉 You've completed the registration. If you're selected for the test grid, you'll receive an email with further information.

Warning: To find your node's Solana key, navigate to ~/.nosana/nosana_key.json. It's crucial to back up this file to ensure its security.

5. Optional: Running Podman in Docker

If you're running Ubuntu natively, you can start a Podman instance using Docker. This step is optional, as the register.sh script performs this in the final step:

docker run -d 
  --pull=always 
  --gpus=all 
  --name podman 
  --device /dev/fuse 
  --privileged 
  -e ENABLE_GPU=true 
  -p 8080:8080 
  nosana/podman podman system service --time 0 tcp:0.0.0.0:8080

To confirm GPU support in the Podman container, execute:

docker exec -it podman bash
podman run --rm --device nvidia.com/gpu=all --security-opt=label=disable ubuntu nvidia-smi -L

If unsuccessful, ensure that NVIDIA drivers and nvidia-ctk are installed and configured correctly.

To verify that Podman is running correctly, use:

curl http://localhost:8080/v4.5.0/libpod/info

6. Starting a Nosana Node with Custom Parameters

You can manually start a Nosana node to modify certain parameters:

  • Use the --podman parameter to direct it to the service if the Podman service is running elsewhere.
  • If you want to use your own key, map the solana key into the Docker container using --volume /root/.nosana/nosana_key.json.
docker run 
  --pull=always 
  --network host  
  --interactive 
  --volume ~/.config/solana/id.json:/root/.nosana/nosana_key.json 
  nosana/nosana-node 
     --podman http://localhost:8080  
     join-test-grid

By following this guide, you should now have a fully functional Nosana node set up for GPU computing. Remember to keep your system updated and monitor your node's performance regularly.

Keywords for SEO: Nosana node, GPU computing, NVIDIA drivers, CUDA toolkit, Docker, Podman, Ubuntu, test grid, decentralized network, blockchain

© 版权声明

相关文章