Please read NuNets Disclaimer before installing any software on your devices.
A device management service or DMS is a program that helps users run various computational services, including machine learning (ML) jobs, on a compute provider machine, based on an NTX token request system on NuNet. In simple terms, it connects users who want to perform computational tasks to powerful CPU/GPU enabled computers that can handle these tasks. The purpose of the DMS is to connect users on NuNet, allow them to run any service (not only ML jobs) and be rewarded for it.
The NTX token is a digital cryptographic asset available on the Cardano and Ethereum blockchain as a smart contract. However, for the current use case of running machine learning jobs, only the Cardano blockchain is being used. Users request and allocate resources for computational jobs through a Service Provider Dashboard. Compute providers receive the NTX tokens based on the jobs through a Compute Provider Dashboard.
Please note that the dashboards are not components of NuNet's core architecture. Both these components have been developed to perform the current use case that is to run ML jobs on compute providers machines.
Here's a step-by-step explanation:
Users have computational services they want to run. These services often require a lot of computing power, which may not be available on their personal devices.
Compute provider machines are powerful computers designed to handle resource-intensive tasks like machine learning jobs.
The device management service acts as a bridge, connecting users with these compute provider machines.
Users specify resources and job requirements through a webapp interface, and request access to the compute provider machines by sending mNTX tokens. mNTX acts as a digital ticket, granting users access to the resources they need.
The device management service receives the job request after verifying the authenticity of the mNTX transaction through an Oracle.
Once received, the DMS allocates the necessary resources on the compute provider machine to run the user's job.
The user's job is executed on the provider's machine, and the results are sent back to the user.
In summary, a device management service simplifies the process of running machine learning jobs on powerful computers. Users can easily request access to these resources with NTX tokens, allowing them to complete their tasks efficiently and effectively.
Before going through the installation process, let's take a quick look at the system requirements and other things to keep in mind.
When using a VM or WSL, using Ubuntu 20.04 is highly recommended.
Skip doing an unattended installation for the new Ubuntu VM as it might not add the user with administrative privileges.
Enable Guest Additions when installing the VM (VirtualBox only).
Always change the default NAT network setting to Bridged before booting the VM.
Install Extension Pack if on VirtualBox (recommended)
Install VMware Tools if on VMware (recommended)
ML on GPU jobs on VMs are not supported
Install WSL through the Windows Store.
Install the Update KB5020030 (Windows 10 only)
Install Ubuntu 20.04 through WSL
Enable systemd on Ubuntu WSL
ML Jobs begun on Linux cannot be resumed on WSL
Make sure virtualization is enabled in the system BIOS
Though it is possible to run ML jobs on Windows machines with WSL, using Ubuntu 20.04 natively is highly recommended. The reason being our development is completely based around the Linux operating system. Also, the system requirements when using WSL would increase by at least around 25%.
If you are using a dual boot machine, make sure you use the wsl --shutdown
command before shutting down Windows and running Linux for ML jobs. Also, ensure your Windows machine is not in a hibernated state when you reboot into Linux.
We only require for you to specify CPU (MHz x no. of cores) and RAM but your system must meet at least the following set of requirements before you decide to onboard it:
CPU - 2 GHz
RAM - 4 GB
Free Disk Space - 10 GB
Internet Download/Upload Speed - 4 Mbps / 0.5 MBps
If the above CPU has 4 cores, your available CPU would be around 8000 MHz. So if you want to onboard half your CPU and RAM on NuNet, you can specify 4000 MHz CPU and 2000 MB RAM.
CPU - 3.5 GHz
RAM - 8-16 GB
Free Disk Space - 20 GB
Internet Download/Upload Speed - 10 Mbps / 1.25 MBps
CPU - 3 GHz
RAM - 8 GB
NVIDIA GPU - 4 GB VRAM
Free Disk Space - 50 GB
Internet Download/Upload Speed - 50 Mbps
CPU - 4 GHz
RAM - 16-32 GB
NVIDIA GPU - 8-12 GB VRAM
Free Disk Space - 100 GB
Internet Download/Upload Speed - 100 Mbps
Here's a step by step process to install the device management service (DMS) on a compute provider machine:
Download the DMS package:
Download the latest version with this command: (note please use the second option for now until we fix the auto linked latest version)
Install DMS:
DMS has some dependencies, but they'll be installed automatically during the installation process.
Open a terminal and navigate to the directory where you downloaded the DMS package (skip this step if you used the wget command above). Install the DMS with this command:
If the installation fails, try these commands instead:
If you see a "Permission denied" error, don't worry, it's just a notice. Proceed to the next step.
Check if DMS is running: Look for "/usr/bin/nunet-dms" in the output of this command:
If it's not running, submit a bug report with the error messages. Here are the contribution guidelines.
Uninstall DMS (if needed):
To remove DMS, use this command:
To download and install a new DMS package, repeat steps 1 and 2.
Completely remove DMS (if needed):
To fully uninstall and stop DMS, use either of these commands:
or
Update DMS:
To update the DMS to the latest version, follow these steps in the given sequence:
a. Uninstall the current DMS (Step 3)
b. Download the latest DMS package (Step 1)
c. Install the new DMS package (Step 2)
Please read NuNets Disclaimer before installing any software on your devices.
The Compute Provider Dashboard (CPD) is a locally available interface that enables compute providers to monitor and manage their machines effectively. The current version of the dashboard facilitates receiving NTX tokens for computational jobs. In future, it would provide basic telemetry data, such as resource utilization, job status, and system performance, allowing providers to optimize their services.
The dashboard interface aims to offer valuable insights into token management, machine performance and resource allocation. It would empower providers to make informed decisions about their services and ensure the best possible experience for their users.
Before you install the Compute Provider Dashboard, make sure:
you have already installed the device management service
you are using a desktop machine (servers are not currently supported)
To install the Compute Provider Dashboard on your system, follow these steps:
Step 1: Download the nunet-cpd-latest.deb package using the wget command. Open a terminal window and enter the following command:
This command will download the nunet-cpd-latest.deb package from the provided URL.
Step 2: Install the nunet-cpd-latest.deb package. After downloading the package, enter the following command in the terminal:
This command will update your system's package index and then install the nunet-cpd-latest.deb package. The -y
flag automatically accepts the installation prompts.
Step 3: Access the management dashboard. Open your preferred internet browser and visit:
This URL will direct you to the Compute Provider Dashboard hosted on your local machine, where you can start using the service to manage your machine learning jobs and connect your NTX wallet.
Keep in mind that these installation instructions assume you are using a Debian-based Linux distribution, such as Ubuntu. The installation process may differ for other operating systems.
To use the device management service with the Cardano blockchain, follow these steps to connect your NTX wallet and integrate it with the management dashboard:
Step 1: Add your NTX wallet address, which is based on the Cardano blockchain. Your wallet address is a unique identifier that enables you to receive and send NTX tokens within the Cardano network.
Step 2: Select the Cardano blockchain by clicking on the corresponding radio button. This ensures that the device management service communicates with the appropriate blockchain network to facilitate the exchange of NTX tokens for machine learning job requests.
Step 3: Connect your wallet to the Compute Provider Dashboard by clicking the "Connect Wallet" button at the top right corner of your browser. This action will initiate a secure connection between your wallet and the dashboard, allowing for seamless token transactions.
Finally, click on "Submit" to confirm your wallet connection and complete the integration process. Once connected, you can use your NTX tokens to request resources and manage your machine learning jobs through the Compute Provider Dashboard.
If you experience issues while using the dashboard, you can open the inspect console in your browser to get more information about the error. Here's how to do it:
Open the dashboard in your web browser.
Right-click anywhere on the page and select "Inspect" from the context menu. Alternatively, you can use the keyboard shortcut Ctrl + Shift + I
on Windows/Linux or Cmd + Option + I
on Mac to open the inspect console.
The inspect console will open in a separate window or panel. Look for the "Console" tab, which should be near the top of the panel.
If there are any errors, they will be displayed in the console with a red message.
When you hit the /run/request-reward
endpoint, you may encounter the following errors:
404
Not Found: This error occurs when there is no active job to claim.
102
Processing: This error occurs when there is an active job but it has not finished yet. The user should wait until they request again.
500
Internal Server Error: This error occurs when the connection to the Oracle fails.
200
OK: This response indicates success. It includes the signature
, oracle_message
, and reward_type
.
When you hit the /run/send-status
endpoint, you may encounter the following errors:
400
Bad Request: This error occurs when the payload is not structured properly and cannot be read.
200
OK: This response indicates success. It includes the message "transaction status %s acknowledged", where %s
is one of the transaction status sent from the webapp.
Please read NuNets Disclaimer before installing any software on your devices.
Device Management Service (DMS): A service for both users and compute providers to manage their devices on the NuNet platform. Follow the Device Management Service documentation for installation and usage instructions. Our NuNet CLI manual would also be an essential reference.
Service Provider Dashboard (For End-Users Who Request Jobs with NTX): A web application for users to manage and monitor their ML jobs on the NuNet platform. Follow the Service Provider Dashboard documentation for installation and usage instructions.
Compute Provider Dashboard (For Compute Providers Who Receive Jobs for NTX): A web application for compute providers to manage their resources and monitor the jobs running on their devices. Follow the Compute Provider Dashboard documentation for installation and usage instructions.
Note that both service providers (end-users) and compute providers must install the DMS on their local machines before installing either the Service Provider Dashboard (SPD) or the Compute Provider Dashboard (CPD). The DMS is an installation dependency for both applications.
Please read NuNets before installing any software on your devices.
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.
Open the terminal and run the following command to access the CLI:
The CLI provides several commands and options for managing your device on the NuNet platform. The general syntax is:
Here's the complete list of the command line options that can be used with the CLI:
capacity
: Display capacity of device resources
wallet
: Get Current Wallet Address
onboard
: Onboard the device to NuNet
info
: Get information about the currently onboarded machine
onboard-gpu
: Install NVIDIA GPU driver and Container Runtime
onboard-ml
: Prepare the system for Machine Learning with GPU
resource-config
: Change the configuration of onboarded device
shell
: Send commands and receive answers to a vm instance via DMS
peer
: Interact with currently visible peers
chat
: Start, Join, or List Chat Requests
log
: Returns the path of an archive containing all log files
Let's look into each of them and how they work.
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.
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:
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.
To pause the DMS onboarding process, you can use the following command:
This command will temporarily stop the 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.
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.
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:
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.
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
.
Get information about the currently onboarded machine. To run this command, use the following command:
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 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.
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.
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
.
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
.
Please read NuNets before installing any software on your devices.
The Service Provider Dashboard (SPD) is an intuitive and accessible platform crafted specifically for a diverse range of users, including end-users, machine learning developers, and researchers. Its primary purpose is to streamline the process of requesting CPU/GPU machine learning jobs on compute provider machines, enabling users to focus on their projects without worrying about infrastructure complexities.
By harnessing the power of NTX tokens, users can seamlessly access cutting-edge, decentralized cloud-based computational resources for executing their machine learning projects. This innovative approach not only simplifies the process but also democratizes access to advanced computing capabilities.
The SPD is compatible with widely-used machine learning libraries, such as TensorFlow, PyTorch, and scikit-learn, ensuring that users can effortlessly integrate their preferred tools and frameworks. Moreover, the platform provides the flexibility to run jobs on either CPUs or GPUs, catering to various computational needs and budget constraints.
Designed with a user-centric approach, the SPD's simple interface allows users to easily submit their ML models, define resource usage based on their job requirements, and keep track of their job's progress in real-time. This level of transparency and control empowers users to manage their machine learning jobs effectively and efficiently, ultimately facilitating and accelerating the development & deployment of innovative AI solutions.
Before you install the NuNet ML SPD, make sure:
you have already installed the device management service
you are using a desktop machine (servers are currently not supported)
To install the NuNet ML SPD on your system, follow these steps:
Step 1: Download the nunet-spd-latest.deb package using the wget command. Open a terminal window and enter the following command: (please the second option for now to get the latest version intil we fix the latest version links.)
This command will download the nunet-spd-latest.deb package from the provided URL.
Step 2: Install the nunet-spd-latest.deb package. After downloading the package, enter the following command in the terminal:
This command will update your system's package index and then install the nunet-spd-latest.deb package. The -y
flag automatically accepts the installation prompts.
Step 3: Access the ML SPD. Open your preferred internet browser and visit:
This URL will direct you to the SPD hosted on your local machine, where you can start using the service to manage your machine learning jobs and connect your NTX wallet.
Keep in mind that these installation instructions assume you are using a Debian-based Linux distribution, such as Ubuntu. The installation process may differ for other operating systems.
To use the Device Management Service (DMS) with Cardano, make sure your service provider machine connects with at least two DHT peers on NuNet. You can check this by using the nunet peer list
command after you've set up your machine for a while.
Once confirmed, you can ask to run an ML job. This involves connecting your NTX wallet and integrating it with the Service Provider Dashboard (SPD) through the following steps:
Step 1: Connect your wallet to the SPD by clicking the "Connect Wallet" button at the top right corner of your browser. This action will initiate a secure connection between your wallet and the dashboard, allowing for seamless token transactions.
Step 2: Access the SPD on the service provider machine and navigate to the first page of the UI at localhost:9991
. on your preferred browser.
Step 3: Provide the ML Model URL by pasting the link to your Python program that contains the machine learning code.
Some examples that you can use for testing it out:
Step 4: Choose the type of compute resource you want to use for the job:
Select the CPU radio button if you want to run the job on a CPU-only machine. Currently supported libraries for CPU jobs are TensorFlow, PyTorch, and scikit-learn.
Select the GPU radio button if you want to run the job on a GPU machine. Henceforth, choose either the TensorFlow or PyTorch radio button to specify the library used in the program. For GPU jobs, only TensorFlow and PyTorch are currently supported.
Step 5: Specify the resource usage type: Low, Moderate, or High - depending upon the complexity of your job.
Step 6: If your job has any dependencies, enter their names by choosing the "+" symbol. If you are using our GPU based example code mentioned in step 3, note that you would need to specify a dependency named matplotlib
. The CPU example does not require any dependencies.
Step 7: Enter the expected time for your job's completion and click 'Next' to proceed to the second page of the SPD's UI.
Step 8: When you connect your wallet, the NTX wallet address field would be auto-filled, based on the Cardano blockchain. Your wallet address is a unique identifier that enables you to send and receive NTX tokens within the Cardano network.
Step 9: Select the Cardano blockchain by clicking on the corresponding radio button. This ensures that the device management service communicates with the appropriate blockchain network to facilitate the exchange of NTX tokens for machine learning job requests.
Finally, click on "Submit" to confirm your wallet connection and complete the integration process. Once connected, your NTX tokens would be used to deploy the requested job by allocating it to a compute provider machine that matches the resource requirements. You can also monitor the progress of the machine learning job through the same dashboard.
Note: Currently, the WebSocket on the SPD does not have session management. This affects users because when they reload the page after making a deployment, they will not receive any response. This would be improvised in the near future. But it's recommended not to reload the page after deployment and wait for some time. For further troubleshooting if you do not receive any response after waiting for some time following a deployment, you can try the following:
Check the network connection: The first step is to ensure that the network connection is stable and working correctly. The user can try opening a different website to confirm that the issue is not with their internet connection.
Clear the browser cache: Sometimes, the browser cache can cause issues when loading web pages. Clearing the cache can help resolve this problem. The user can try clearing their browser cache and then reloading the page.
File a bug report: If the issue persists, the user should file a bug report about the problem. They can provide details about the issue and any error messages received, which will help in diagnosing and resolving the problem.
In general, it's always a good idea to document the steps taken and any error messages received when encountering issues with a web application. This information can be helpful when seeking support or troubleshooting the problem later on.
If you experience issues while using the dashboard, you can open the inspect console in your browser to get more information about the error. Here's how to do it:
Open the dashboard in your web browser.
Right-click anywhere on the page and select "Inspect" from the context menu. Alternatively, you can use the keyboard shortcut Ctrl + Shift + I
on Windows/Linux or Cmd + Option + I
on Mac to open the inspect console.
The inspect console will open in a separate window or panel. Look for the "Console" tab, which should be near the top of the panel.
If there are any errors, they will be displayed in the console with a red message.
When you hit the /run/request-service
endpoint, you may encounter the following errors on the browser console:
400
Bad Request: This error occurs when the JSON payload received from the webapp cannot be parsed. This is unlikely to happen due to user error.
500
Internal Server Error: This error occurs when the DMS (Device Management Service) cannot find the libp2p public key. This is probably because the compute provider has not been onboarded properly.
400
Bad Request: This error occurs when the estimated price received from the webapp is more than expected. This is very unlikely to happen because the webapp guards against it.
404
Not Found: This error occurs when the DHT (Distributed Hash Table) does not have any peers with matching specs. After analyzing and filtering machines based on the constraints section on the payload, the DMS found no matched machine.
503
Service Unavailable: This error occurs when the DMS cannot connect to the Oracle for whatever reason.
500
Internal Server Error: This error occurs when a new service cannot run because the DMS is already running a service. Only one service is supported at the moment.
500
Internal Server Error: This error occurs when the DMS was not able to access the database.
200
OK: This response indicates success. It includes the compute_provider_addr
, estimated_price
, signature
, and oracle_message
.
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 .
Additionally, you can find at for real-time statistics about computational processes executed on the network, telemetry information, and more.
CPU -
GPU -