NuNet CLI: For Device Onboarding
Please read NuNets Disclaimer before installing any software on your devices.
Introduction
This manual provides instructions on how to use the NuNet Command Line Interface (CLI) to onboard a device, manage resources, wallets, and interact with peers.
Getting Started
Open the terminal and run the following command to access the CLI:
Usage
The CLI provides several commands and options for managing your device on the NuNet platform. The general syntax is:
Commands
Here's the complete list of the command line options that can be used with the CLI:
capacity
: Display capacity of device resourceswallet
: Get Current Wallet Addressonboard
: Onboard the device to NuNetinfo
: Get information about the currently onboarded machineonboard-gpu
: Install NVIDIA GPU driver and Container Runtimeonboard-ml
: Prepare the system for Machine Learning with GPUresource-config
: Change the configuration of onboarded deviceshell
: Send commands and receive answers to a vm instance via DMSpeer
: Interact with currently visible peerschat
: Start, Join, or List Chat Requestslog
: Returns the path of an archive containing all log files
Let's look into each of them and how they work.
Onboarding a Device
Check the available resources on your device by running the following command:
If you don't have an existing wallet address, create a new one using either Ethereum or Cardano blockchain (We currently recommend using Cardano at the moment as this is the primary blockchain for testing and will be the focus for our Public Alpha) but have included both as NuNet is a multichain protocol and will support many chains in the future:
For Cardano (we use this the our current testing):
If you are testing do not use the new address when on-boarding the device, but instead You should use the wallet you have set up on the cardano preprod network. Also if you do use the wallet new command in production make sure you use the private key to add to a wallet and that you have access, as this is the wallet you will be claiming to.
When we support other blockchains in the future, you would simply need to change the blockchain name when creating a wallet through the above command.
Make sure you backup the mnemonic and wallet address for safe keeping. Do not share it with anyone. This is the same wallet address that you would be providing on the Compute Provider Dashboard.
Onboard your NVIDIA or AMD GPU
Note: You can skip this step if you don't have a GPU on your compute provider machine. If you are using a mining operating system such as HiveOS, only the NVIDIA container runtime would be installed, as it comes bundled with both NVIDIA and AMD drivers preinstalled.
Install the NVIDIA/AMD GPU driver and container runtime. To run this command, use the following command:
For NVIDIA GPUs, the above command will work on both native Linux (Debian) and Windows Subsystem for Linux (WSL).
For AMD GPUs, the command will work only on native Linux (Debian), as there is currently no support on WSL.
NuNet's GPU onboarding also checks for Secure Boot if applicable, with the necessary messages to help the user. You can either choose to sign it with a machine owner key (MOK) if enabled, or keep it disabled in the BIOS.
After onboarding the GPU, it is recommended to reboot your machine with the following command:
Onboard your device to the NuNet platform using the following command:
Replace <memory in MB>
, <cpu in MHz>
, and <address>
with the appropriate values based on your device's resources (noted in onboarding step 1) and your wallet address.
if you a running on a local network behind a router use the -l command this will help you with peer discovery. Do not use this if you are onboarding a machine with a public IP address as it will scan the subnet you are on an could cause problems with your service provider.
For example:
For a machine with a local IP address use this syntax
For a machine with a public IP address use this syntax
The
-C
option is optional and allows deployment of a Cardano node. Your device must have at least 10,000 MB of memory and 6,000 MHz of compute capacity to be eligible.The
-l
option is optional but important. Use-l
when running the DMS on a local machine (e.g., a laptop or desktop computer) to enable advertisement and discovery on a local network address. Do not use-l
when running the DMS on a machine from a datacenter.
Prepare the system for Machine Learning (For GPU machines only)
Prepare the system for machine learning with GPU. We include this step to reduce the time for starting jobs because of large-sized GPU based ML images of TensorFlow and PyTorch. To do this, use the following command:
The above command preloads (downloads) the latest ML on GPU images for training/inferencing/computing on NuNet.
Wait a few minutes for components to start and peers to be discovered.
Check your peer information and the peers your DMS is connected to by running the following commands:
You can lookup connected peers. To list visible peers, use the following command:
To know you own peer info, use:
If you see other peers in the list, congratulations! Your device is successfully onboarded to NuNet. If you only see your node, don't worry. It may take time to find other peers, especially if your device is behind symmetric NAT.
At any time after onboarding, you can also check how much resources had been allocated to NuNet previously with the following command:
To check your machine's full capacity, you can always use:
Temporarily Pausing and Unpausing Onboarding
Sometimes, you may need to temporarily pause onboarding. You may want to do this if you need to use all of your device's resources, troubleshoot or perform maintenance tasks on your machine. The steps below provide a simple explanation of how to pause and unpause the DMS onboarding process using two commands.
Pause the Device Onboarding Process
To pause the DMS onboarding process, you can use the following command:
This command will temporarily stop the onboarding process.
Unpause the Device Onboarding Process
After you've paused the onboarding process and completed any necessary tasks, you can resume the process with the following command:
This command will unpause and resume onboarding, allowing your device to once again find, and be seen by other peers on NuNet.
Important Note
If you do not manually unpause the onboarding process, it will automatically resume after a reboot or when the device powers up after being shut down.
Remember to always use these commands responsibly and only when needed, as interrupting the onboarding process may lead to unexpected behavior or issues with NuNet's decentralized peer-to-peer communication system on the device.
Enter a NuNet Peer's Shell
You can also send commands and receive answers to a VM instance via DMS. To do that, use the following format:
The node-id can be obtained from the nunet peer list
command. For example:
Chat with Peers
To start a chat with a peer, use the following format:
For example:
To list open chat requests:
To clear open chat requests:
To join a chat stream using the request ID:
The request-id mentioned above can be obtained from the nunet chat list
command stated earlier.
Collect Logs
You can return the path of an archive containing all NuNet log files. To run this command, use:
This should return the path to the archive containing the log files, such as /tmp/nunet-log/nunet-log.tar
.
Display NuNet System Configuration with ML Readiness
Get information about the currently onboarded machine. To run this command, use the following command:
Onboard NVIDIA/AMD GPU
Install the NVIDIA/AMD GPU driver and NVIDIA container runtime. To run this command, use the following command:
This command will work on both native Linux (Debian) (both NVIDIA and AMD GPUs) and WSL (NVIDIA GPUs only) machines. It also checks for Secure Boot if necessary.
Prepare the System for Machine Learning
Prepare the system for machine learning with GPU. We include this step to reduce the time for starting jobs because of large-sized GPU based ML images of TensorFlow and PyTorch. To do this, use the following command:
The above command preloads (downloads) the latest ML on GPU images for training/inferencing/computing on NuNet.
Check the GPU status in real time
To use this option, add the -gpu
or the --gpu-status
flag to available
command like this:
This allows you to check NVIDIA/AMD GPU utilization, memory usage, free memory, temperature and power draw when the machine is idle or busy.
Check the availability of CUDA and Tensor Cores
To use this option, add it to the capacity
command like this:
As a shorter alternative, you can also use -ct
. To perform this check, the command leverages the NuNet PyTorch NVIDIA container used for onboard-ml
.
Check the availability of ROCm and HIP
To use this option, add it to the capacity
command like this:
As a shorter alternative, you can also use -rh
. To perform this check, the command leverages the NuNet PyTorch AMD container used for onboard-ml
.
More Information
Additionally, you can find NuNet Network Status Dashboard at https://stats-grafana.test.nunet.io/ for real-time statistics about computational processes executed on the network, telemetry information, and more.
Last updated