This is step-by-step guide that show you how to install and start using Sonm for renting computing resources and task execution. Installation will not affect your operating system or files.
You’ll need to consider the following before starting the installation:
- Connect your laptop/PC to a power source. The PC may have MacOS, Windows or Linux.
- Ensure you have an internet connection and browser.
Follow the next step to start installation.
- Open cmd.
- Use the auto-installation script:
sudo bash -c "$(curl -s https://raw.githubusercontent.com/sonm-io/autodeploy/master/sonm-auto-deploy-consumer.sh)".
- After installation components for customers (CLI, Node) will start automatically.
We recommend the auto-installation, but you may also install the Sonm components manually:
Account settings: Keystore file
You should have your own Ethereum account to pay for resources in Sonm.
Your account is your unique identifier for:
- deals in the Sonm blockchain
- profile certificates, deal statistics, contact information, etc
- personal blacklists (common for all supplier workers to not enter into deals with specified addresses)
We generate your personal account (UTC/JSON keystore file) during the installation. You can find the keystore path and passphrase with
cat ~/.sonm/cli.yaml. Keystore file default location:
If you want to use your existing account, replace the file in the appropriate folder with yours.
Account settings: Create new wallet
To start working with your account:
- Get your keystore file. Keystore file default location:
- Open the Sonm Market.
- Create a new wallet by clicking the “Create wallet” button. Input a name, password, and password confirmation and choose “livenet” as the Ethereum network (“rinkeby” is a testnet).
- Then, click “Create wallet”. You will see your wallet in Sonm Market without accounts.
Next we add your account here.
Account settings: Add account
- Select “Wallet” -> “Accounts” in the main menu. This will take you to the account list.
- Click the “Import Account” button to add your UTC/JSON keystore file. Select the file and enter the account name and passphrase. Click “Add” to finish.
- Now you will see your account in the list and your funds in Ethereum and Sonm tokens. Your account is now set up.
- To verify the installation of the Sonm CLI component and check your account, please start the Sonm CLI and use the ‘
sonmcli login’ command. There should be no “Enter password” request.
Payments: Deposit tokens
Deposit tokens are required for replenishing your balance in the Sonm blockchain, where you rent and pay for resources. You may use the Sonm Market or Sonm CLI.
To deposit tokens in the Sonm Market:
- Go to “Market” -> “Deposit”;
- Set value of the deposit in SONM tokens and fee parameters (gas limit, gas price). You should have enough Ether and tokens on your main balance. Click Next.
- Check the values, and input your account password. Click Deposit.
- Wait for the end of the transaction. View your changed balance!
To deposit tokens in the Sonm CLI:
- Open cmd (Sonm components are started);
Use the ‘sonmcli token deposit’ command.
We use special Gate smart contracts and Gatekeeper masternodes to validate transactions for depositing SNM tokens to the Sonm blockchain and withdrawing them to the main Ethereum network. The transactions are not instantaneous – there are delays:
- validation of transactions (including transactions to the blockchain) – this depends on the current workload of the main Ethereum network and your transaction settings (“gas limit” and “gas price”)
- quarantine period for the gate – 15 minutes
Taking this into account, the normal time it takes to deposit funds in the respective other blockchain is <the time it takes to mine your transaction + 15 minutes>
KYC (Know Your Customer) is a procedure that allows a supplier to confirm the identity of the counterparty (customer) participating in a deal before it is conducted. After undergoing KYC verification, customers can use the resources they have rented on the Sonm platform to run individually created tasks: machine learning, rendering, etc. Users who have not yet passed the KYC procedure can run only the computational tasks included in the Sonm Whitelist.
To complete the KYC procedure and receive “Identified” status, you need to:
- Go into your profile in the Sonm Market and click the profile icon at the top
- Click the “Get Certification” button
- Select “Cryptonomica” from the list and follow the guide steps.
- After the KYC is completed, your status will change to “Identified”
Rent resources: Quick rent
To quick rent resources use the Sonm Market:
- Go to “Market” -> “Orders”.
- Choose an appropriate sell order. Click on the order to see all parameters.
- If you want to buy it please click the “Buy” button.
- After that if the order has a limited duration, you may set you duration value that should be equal or less than supplier’s. For non limited orders there is no such a step.
- Check all the parameters and confirm the deal: input your account password and click “Buy”.
- Wait a little time, and after your deal is created you will see the notification.
- You may see your deals on the “Market” -> “Deals” page. You may see the deal details by clicking on the deal.
Order and deal prices on the Sonm marketplace are in USD. Payments are executed in SNM tokens in accordance with the current SNM/USD exchange price. When you open a deal, SNM tokens are transferred from your address to the marketplace smart contract.
Rent resources: Manual configuration
If the configuration you need is not available for rent on Sonm Market at the moment, you can set up manual configuration rent using Sonm CLI:
- Configure the buy-order parameters necessary for your task: create or edit the bid.yaml file
- Configure the values of RAM, CPU, network, and GPU hashrate. Set the price you’re offering.
- Set the duration of the deal. Zero means that the deal is spot and can be interrupted by the supplier at any time. To perform a machine-learning task, set the time of the deal as the minimum time required to complete your task.
- Create an order on the Marketplace to buy resources: sonmcli order create bid.yaml.
- Wait a few minutes and check whether the deal has been settled: sonmcli deal list. The creation of the deal is carried out automatically as soon as a suitable sell order is found on the Sonm marketplace.
Execute the task: Run
For now, task execution is possible only through the Sonm CLI. Follow the next steps:
- Prepare a file with a description of the task: edit task.yaml file. You can find task specification examples on our GitHub page.
- Start the task using the command sonmcli task start <deal_id> task.yaml –timeout=100m.
- Wait until the task has started. This process can take a long time because the worker needs to pull up the docker image.
- See the task logs using the command sonmcli task logs <deal_id> <task_id>.
Finish the deal
- After the task execution has ended, stop the task: sonmcli task stop <deal_id> <task_id>.
- If you don’t have any other tasks planned, don’t forget to finish the deal to stop spending Sonm tokens: sonmcli deal close <deal_id>.
The supplier will receive payment for the deal duration. The rest of the SNM tokens frozen are returned to your account!
See Sonm CLI Guide for additional information about task management.
If you get stuck, help is always available. We provide you with 24/7 technical support.
If you experience any errors or difficulties with our product, you can get support via:
Please be ready to provide all the required information to help us solve your issue.
Check if your Sonm platform components are working correctly using our self-check guide.
Also, please write up a step-by-step description of the actions that led to the error and provide us with the command outputs.