Skip to content

Instantly share code, notes, and snippets.

@moeiscool
Last active January 15, 2024 14:41
Show Gist options
  • Select an option

  • Save moeiscool/e4ea3ecfdcf0a29da21c5b7a687726b7 to your computer and use it in GitHub Desktop.

Select an option

Save moeiscool/e4ea3ecfdcf0a29da21c5b7a687726b7 to your computer and use it in GitHub Desktop.

Revisions

  1. moeiscool revised this gist Nov 6, 2021. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions part3.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,2 @@
    cd ./xmrig-6.15.3
    pm2 start xmrig -- --config config.json
  2. moeiscool revised this gist Nov 6, 2021. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions part2.sh
    Original file line number Diff line number Diff line change
    @@ -17,3 +17,4 @@ cp libxmrig-cuda.so ../xmrig-6.15.3/libxmrig-cuda.so
    cd ../xmrig-6.15.3
    echo "edit config.json and set the following :"
    echo "cuda.enabled : true"
    echo 'cuda.loader : "./libxmrig-cuda.so"'
  3. moeiscool created this gist Nov 6, 2021.
    24 changes: 24 additions & 0 deletions part1.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,24 @@
    echo "Installing dependencies"
    sudo apt install gcc-7 g++-7 cmake git -y
    sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 800 --slave /usr/bin/g++ g++ /usr/bin/g++-7

    echo "============="
    echo "Installing Node.js : For using PM2 daemon manager"
    wget https://deb.nodesource.com/setup_12.x
    chmod +x setup_12.x
    ./setup_12.x
    sudo apt install nodejs -y
    sudo apt install node-pre-gyp -y
    rm setup_12.x
    if ! [ -x "$(command -v npm)" ]; then
    sudo apt install npm -y
    fi
    sudo npm install [email protected] -g

    echo "============="
    echo "Install NVIDIA Drivers with CUDA 10.0 and CUDNN, CUDNN-dev"
    echo "Probably don't need them all but I used this script and does have them."
    echo "Reboot will be required before running part2.sh!!!!"
    wget https://gitlab.com/Shinobi-Systems/Shinobi/-/raw/dev/INSTALL/cuda-10.sh
    ./cuda-10.sh

    19 changes: 19 additions & 0 deletions part2.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,19 @@
    echo "I really hope you rebooted after part1.sh! Here we go!"

    wget https://github.com/xmrig/xmrig/releases/download/v6.15.3/xmrig-6.15.3-linux-x64.tar.gz
    tar -xvf xmrig-6.15.3-linux-x64.tar.gz


    echo "============="
    echo "Get and Build XMRig CUDA Plugin"
    git clone https://github.com/xmrig/xmrig-cuda.git
    cd xmrig-cuda
    mkdir build
    cd build
    cmake ..
    make
    cp libxmrig-cuda.so ../xmrig-6.15.3/libxmrig-cuda.so

    cd ../xmrig-6.15.3
    echo "edit config.json and set the following :"
    echo "cuda.enabled : true"