Running a GPU miner on an Ubuntu based Virtual Machine may not work properly. This includes most VMs that run on top of Windows or WSL2.
Introduction
Here, we’ll be installing quai-gpu-miner, the implementation of a Quai Network ProgPOW miner. This tutorial will focus on installing and running quai-gpu-miner on Ubuntu, an enterprise and open source Linux distribution.Requirements
In order to run the quai-gpu-miner on Ubuntu and mine valid blocks, you’ll need the following:Environment Setup
Ubuntu
For this tutorial, you’ll need an Ubuntu machine. Instructions on how to download and install Ubuntu on your machine can be found on the Ubuntu installation instructions.The quai-gpu-miner is default configured to be compiled on Ubuntu v20.04. If you’re using other versions of Ubuntu, you may need to change
the CUDA toolkit version in the installation script.
Miner Installation
The quai-gpu-miner repository contains a automated script that can be used to compile and build the miner. Thedeploy_miner.sh
script will install the following build dependencies and build the latest version of the miner:
- git
- cmake
- build-essential
- mesa-common-dev
- Nvidia CUDA Toolkit v12.6
deploy_miner.sh
file executable:
This script installs the CUDA keyring version for Ubuntu v20.04. If you’re using other versions of Ubuntu, you may need to edit the CUDA
keyring version downloaded in the script. This can be done by changing the
/ubuntu2004/
to the version of Ubuntu you’re using in the
keyring download link.Running this command will compiling and build the miner. This process may take a while to complete, and requires around 10gb of RAM.
output
directory with two built binaries in it: quai-gpu-miner-amd
and quai-gpu-miner-nvidia
. For the card type you have, run the following command to make the binary executable:
Dependencies and Drivers
Now that we’ve installed and built the miner, we need to make sure our system and drivers are up to date.Configure And Run
To run the miner, you’ll need a Stratum proxy to connect to. Visit the quai-stratum-proxy docs for information on how to install and configure it. The proxy configuration will determine which shard your gpu-miner is running on and the address payouts are awarded to. First, you’ll need to obtain the IP Address and port your proxy is running on from the Stratum proxy logs. The default port is3333
.
If your miner and proxy are on the same machine, the
PROXYIPADDRESS
will be localhost
. If your miner and proxy are not on the same
machine, you may need to port forward the proxy port.PROXYIPADDRESS
with the IP Address and STRATUMPORT
with the port your proxy is running on:
Do not start the miner before confirming your node has fully synced. Mining while your node is not synced will result in the mining of
invalid blocks and wasted hash.