Crypto Gloom

Mining background from VAST.AI. Until you do some background work with OC… | Posted by: J | Coins | January 2024

Jay
Coin Monk

We work with OC in the background until the system is leased.

Vast.ai is the leader in affordable cloud GPU rental in the global GPU market.

VAST.AI

The idea is to configure the GPU with the appropriate OC while in background mining.

First, install Python3 and pip if you don’t have them installed.

sudo apt install -y python3-pip

After installing the vastai cli tool, close and reopen your terminal (or SSH session).

pip install vastai

Register your Vatai API key.

vastai set api-key YOUR_API_KEY

Let’s schedule a mining job.
MACHINE_ID can be found at https://cloud.vast.ai/host/machines/.
Remember the Offer ID you got by entering vastai search presents command.

vastai search offers "machine_id=MACHINE_ID verified=any"

Now we run and instantiate.

./vastai create instance OFFER_ID - price 20 - disk 2 - image nvidia/cuda:12.0.0-devel-ubuntu22.04 - onstart-cmd "mkdir /miner; cd /miner; wget -qO- https://github.com/Lolliedieb/lolMiner-releases/releases/download/1.82a/lolMiner_v1.82a_Lin64.tar.gz | tar -xzv - strip-components=1; ./lolMiner -a ETHASHB3 -p HYPRA_POOL -u WALLET_HYPRA.MACHINE_NAME - dualmode KARLSENDUAL - dualpool KARLSEN_POOL - dualuser WALLET_KLS.MACHINE_NAME - nocolor - silence 2 - no-cl - screen=-1 - apiport 4444" - ssh - direct

How to OC RIG is mining.

Create a bash file in your home folder

nano check_lolminer.sh

The file should be the same as changing the WALLET parameter. LolMiner will then check if you are mining with your wallet, so if that happens, when you change your OC and rent the equipment, your OC will automatically be removed for rental.

#!/bin/sh
if ( ! -f /tmp/mining ); then
echo "2" > /tmp/mining
fi
if ( $(ps -edaf | grep WALLET_HYPRA | wc -l ) -gt 1 ); then
if ( $(cat /tmp/mining) -eq 0 ); then
echo "1" > /tmp/mining
nvidia-smi -lgc CCLK_VALUE
nvidia-smi -lmc MCKL_VALUE
nvidia-smi -pl POWER VALUE
fi
else
if ( $(cat /tmp/mining) -eq 1 ); then
echo "0" > /tmp/mining
nvidia-smi -rmc
nvidia-smi -rgc
nvidia-smi -pl $(nvidia-smi -q -d power | grep Default |head -1 | awk 'printf ("%.0f",$5)')
fi
fi

We provide chmod +x:

chmod +x check_lolminer.sh

All that remains is to make sure that the crontab is being edited every minute.

sudo crontab -e

We need to add:

* * * * * /your_folder_/check_lolminer.sh

Then we will be able to mine with lolMiner. In the meantime, you can put any OC you want while it’s not rented.

Different algorithm combinations:

HYPRA + KARLSEN:
lolMiner -a ETHASHB3 -p HYPRA_POOL -u WALLET_HYPRA.MACHINE_NAME - dualmode KARLSENDUAL - dualpool KARLSEN_POOL - dualuser WALLET_KLS.MACHINE_NAME - nocolor - silence 2 - no-cl - screen=-1 - apiport 4444

HYPRA + PYRIN:
lolMiner -a ETHASHB3 -p HYPRA_POOL -u WALLET_HYPRA.MACHINE_NAME - dualmode PYRINDUAL - dualpool PYRIN_POOL - dualuser WALLET_KLS.MACHINE_NAME - nocolor - silence 2 - no-cl - screen=-1 - apiport 4444

HYPRA + ALPH:
lolMiner -a ETHASHB3 -p HYPRA_POOL -u WALLET_HYPRA.MACHINE_NAME - dualmode ALEPHDUAL - dualpool ALPH_POOL - dualuser
WALLET_KLS.MACHINE_NAME - nocolor - silence 2 - no-cl - screen=-1 - apiport 4444

HYPRA + RXD:
lolMiner -a ETHASHB3 -p HYPRA_POOL -u WALLET_HYPRA.MACHINE_NAME - dualmode RXDDUAL - dualpool RXD_POOL - dualuser
RXD.MACHINE_NAME - nocolor - silence 2 - no-cl - screen=-1 - apiport 4444

HYPRA + IRON:
lolMiner -a ETHASHB3 -p HYPRA_POOL -u WALLET_HYPRA.MACHINE_NAME - dualmode RXDDUAL - dualpool FISHDUAL - dualuser
RXD.MACHINE_NAME - nocolor - silence 2 - no-cl - screen=-1 - apiport 4444

NEXA (We can put in nvidia-smi -lmc 5000):
lolMiner -a NEXA -p NEXA_POOL -u WALLET_NEXA.MACHINE_NAME - nocolor - silence 2 - no-cl - screen=-1 - apiport 4444

ALPH (We can put in nvidia-smi -lmc 810):
lolMiner -a ALEPH -p ALPH_POOL -u WALLET_ALPH.MACHINE_NAME - nocolor - silence 2 - no-cl - screen=-1 - apiport 4444

RXD (We can put in nvidia-smi -lmc 810):
lolMiner -a RADIANT -p RXD_POOL -u WALLET_RXD.MACHINE_NAME - nocolor - silence 2 - no-cl - screen=-1 - apiport 4444

PYRIN (We can put in nvidia-smi -lmc 810):
lolMiner -a PYRIN -p RXD_POOL -u WALLET_RXD.MACHINE_NAME - nocolor - silence 2 - no-cl - screen=-1 - apiport 4444

IRONFISH (We can put in nvidia-smi -lmc 810):
lolMiner -a IRONFISH -p IRON_POOL -u WALLET_IRON.MACHINE_NAME - nocolor - silence 2 - no-cl - screen=-1 - apiport 4444

FLUX:
lolMiner -a FLUX -p FLUX_POOL -u WALLET_FLUX.MACHINE_NAME - nocolor - silence 2 - no-cl - screen=-1 - apiport 4444

You can check the miner’s log directly.

This is all thanks to youj296jcnub3 On Discord