Skip to content

Instantly share code, notes, and snippets.

@SpotLabsNET
Last active May 4, 2018 15:53

Revisions

  1. SpotLabsNET revised this gist May 4, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion cpuminer-configure.sh
    Original file line number Diff line number Diff line change
    @@ -25,7 +25,7 @@ sudo apt-get dist-upgrade -y

    # Setup Supervisor
    sudo apt-get install supervisor -y
    echo -e "[program:cpuminer]\ncommand=/home/ubuntu/cpuminer-opt/cpuminer -a cryptonightv7 -o stratum+tcp://us-east.cryptonight-hub.miningpoolhub.com:20580 -O OllaKolla.WorkPC:x\nautostart=true\nautorestart=true\nstderr_logfile=/var/log/cpuminer.err.log\nstdout_logfile=/var/log/cpuminer.out.log" | sudo tee /etc/supervisor/conf.d/cpuminer.conf
    echo -e "[program:cpuminer]\ncommand=/home/ubuntu/cpuminer-opt/cpuminer -a yescrypt -o stratum+tcp://hub.miningpoolhub.com:17021 -O OllaKolla.WorkPC:x\nautostart=true\nautorestart=true\nstderr_logfile=/var/log/cpuminer.err.log\nstdout_logfile=/var/log/cpuminer.out.log" | sudo tee /etc/supervisor/conf.d/cpuminer.conf

    # Start supervisor
    sudo service supervisor restart
  2. SpotLabsNET revised this gist May 4, 2018. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions cpuminer-configure.sh
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,8 @@
    #!/usr/bin/env bash

    # large pages
    sudo sysctl -w vm.nr_hugepages=128

    # install powershell
    sudo curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
    sudo curl -o /etc/apt/sources.list.d/microsoft.list https://packages.microsoft.com/config/ubuntu/16.04/prod.list
  3. SpotLabsNET revised this gist May 4, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion cpuminer-configure.sh
    Original file line number Diff line number Diff line change
    @@ -22,7 +22,7 @@ sudo apt-get dist-upgrade -y

    # Setup Supervisor
    sudo apt-get install supervisor -y
    echo -e "[program:cpuminer]\ncommand=/home/ubuntu/cpuminer-opt/cpuminer -a cryptonightv7 -o stratum+tcp://hub.miningpoolhub.com:20580 -O OllaKolla.WorkPC:x\nautostart=true\nautorestart=true\nstderr_logfile=/var/log/cpuminer.err.log\nstdout_logfile=/var/log/cpuminer.out.log" | sudo tee /etc/supervisor/conf.d/cpuminer.conf
    echo -e "[program:cpuminer]\ncommand=/home/ubuntu/cpuminer-opt/cpuminer -a cryptonightv7 -o stratum+tcp://us-east.cryptonight-hub.miningpoolhub.com:20580 -O OllaKolla.WorkPC:x\nautostart=true\nautorestart=true\nstderr_logfile=/var/log/cpuminer.err.log\nstdout_logfile=/var/log/cpuminer.out.log" | sudo tee /etc/supervisor/conf.d/cpuminer.conf

    # Start supervisor
    sudo service supervisor restart
  4. SpotLabsNET revised this gist May 4, 2018. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions cpuminer-configure.sh
    Original file line number Diff line number Diff line change
    @@ -13,16 +13,16 @@ sudo apt-get -y install software-properties-common
    sudo apt-get -y install automake autoconf pkg-config libcurl4-openssl-dev libjansson-dev libssl-dev libgmp-dev make g++

    # Build cpuminer
    cd ~ && git clone --recursive https://github.com/tpruvot/cpuminer-multi.git
    cd ~/cpuminer-multi && ./build.sh
    cd ~ && git clone --recursive https://github.com/JayDDee/cpuminer-opt.git
    cd ~/cpuminer-opt && ./build.sh

    # Upgrade the system
    sudo apt-get upgrade -y
    sudo apt-get dist-upgrade -y

    # Setup Supervisor
    sudo apt-get install supervisor -y
    echo -e "[program:cpuminer]\ncommand=/home/ubuntu/cpuminer-multi/cpuminer -a lyra2z -o stratum+tcp://hub.miningpoolhub.com:20581 -O OllaKolla.WorkPC:x\nautostart=true\nautorestart=true\nstderr_logfile=/var/log/cpuminer.err.log\nstdout_logfile=/var/log/cpuminer.out.log" | sudo tee /etc/supervisor/conf.d/cpuminer.conf
    echo -e "[program:cpuminer]\ncommand=/home/ubuntu/cpuminer-opt/cpuminer -a cryptonightv7 -o stratum+tcp://hub.miningpoolhub.com:20580 -O OllaKolla.WorkPC:x\nautostart=true\nautorestart=true\nstderr_logfile=/var/log/cpuminer.err.log\nstdout_logfile=/var/log/cpuminer.out.log" | sudo tee /etc/supervisor/conf.d/cpuminer.conf

    # Start supervisor
    sudo service supervisor restart
  5. SpotLabsNET revised this gist May 4, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion cpuminer-configure.sh
    Original file line number Diff line number Diff line change
    @@ -22,7 +22,7 @@ sudo apt-get dist-upgrade -y

    # Setup Supervisor
    sudo apt-get install supervisor -y
    echo -e "[program:cpuminer]\ncommand=/home/ubuntu/cpuminer-multi/cpuminer -a lyra2z -o stratum+tcp://us-east.lyra2z-hub.miningpoolhub.com:20581 -O OllaKolla.WorkPC:x\nautostart=true\nautorestart=true\nstderr_logfile=/var/log/cpuminer.err.log\nstdout_logfile=/var/log/cpuminer.out.log" | sudo tee /etc/supervisor/conf.d/cpuminer.conf
    echo -e "[program:cpuminer]\ncommand=/home/ubuntu/cpuminer-multi/cpuminer -a lyra2z -o stratum+tcp://hub.miningpoolhub.com:20581 -O OllaKolla.WorkPC:x\nautostart=true\nautorestart=true\nstderr_logfile=/var/log/cpuminer.err.log\nstdout_logfile=/var/log/cpuminer.out.log" | sudo tee /etc/supervisor/conf.d/cpuminer.conf

    # Start supervisor
    sudo service supervisor restart
  6. SpotLabsNET revised this gist May 4, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion cpuminer-configure.sh
    Original file line number Diff line number Diff line change
    @@ -22,7 +22,7 @@ sudo apt-get dist-upgrade -y

    # Setup Supervisor
    sudo apt-get install supervisor -y
    echo -e "[program:cpuminer]\ncommand=/home/ubuntu/cpuminer-multi/cpuminer -a yescrypt -o stratum+tcp://hub.miningpoolhub.com:20577 -O OllaKolla.WorkPC:x\nautostart=true\nautorestart=true\nstderr_logfile=/var/log/cpuminer.err.log\nstdout_logfile=/var/log/cpuminer.out.log" | sudo tee /etc/supervisor/conf.d/cpuminer.conf
    echo -e "[program:cpuminer]\ncommand=/home/ubuntu/cpuminer-multi/cpuminer -a lyra2z -o stratum+tcp://us-east.lyra2z-hub.miningpoolhub.com:20581 -O OllaKolla.WorkPC:x\nautostart=true\nautorestart=true\nstderr_logfile=/var/log/cpuminer.err.log\nstdout_logfile=/var/log/cpuminer.out.log" | sudo tee /etc/supervisor/conf.d/cpuminer.conf

    # Start supervisor
    sudo service supervisor restart
  7. SpotLabsNET revised this gist May 4, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion cpuminer-configure.sh
    Original file line number Diff line number Diff line change
    @@ -22,7 +22,7 @@ sudo apt-get dist-upgrade -y

    # Setup Supervisor
    sudo apt-get install supervisor -y
    echo -e "[program:cpuminer]\ncommand=~/cpuminer-multi/cpuminer -a yescrypt -o stratum+tcp://hub.miningpoolhub.com:20577 -O OllaKolla.WorkPC:x\nautostart=true\nautorestart=true\nstderr_logfile=/var/log/cpuminer.err.log\nstdout_logfile=/var/log/cpuminer.out.log" | sudo tee /etc/supervisor/conf.d/cpuminer.conf
    echo -e "[program:cpuminer]\ncommand=/home/ubuntu/cpuminer-multi/cpuminer -a yescrypt -o stratum+tcp://hub.miningpoolhub.com:20577 -O OllaKolla.WorkPC:x\nautostart=true\nautorestart=true\nstderr_logfile=/var/log/cpuminer.err.log\nstdout_logfile=/var/log/cpuminer.out.log" | sudo tee /etc/supervisor/conf.d/cpuminer.conf

    # Start supervisor
    sudo service supervisor restart
  8. SpotLabsNET revised this gist May 4, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion cpuminer-configure.sh
    Original file line number Diff line number Diff line change
    @@ -22,7 +22,7 @@ sudo apt-get dist-upgrade -y

    # Setup Supervisor
    sudo apt-get install supervisor -y
    echo -e "[program:cpuminer]\ncommand=~/cpuminer-multi/cpuminer -a cryptonight -o stratum+tcp://us-east.cryptonight-hub.miningpoolhub.com:20580 -O OllaKolla.AUEEA:x\nautostart=true\nautorestart=true\nstderr_logfile=/var/log/cpuminer.err.log\nstdout_logfile=/var/log/cpuminer.out.log" | sudo tee /etc/supervisor/conf.d/cpuminer.conf
    echo -e "[program:cpuminer]\ncommand=~/cpuminer-multi/cpuminer -a yescrypt -o stratum+tcp://hub.miningpoolhub.com:20577 -O OllaKolla.WorkPC:x\nautostart=true\nautorestart=true\nstderr_logfile=/var/log/cpuminer.err.log\nstdout_logfile=/var/log/cpuminer.out.log" | sudo tee /etc/supervisor/conf.d/cpuminer.conf

    # Start supervisor
    sudo service supervisor restart
  9. SpotLabsNET revised this gist May 4, 2018. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion cpuminer-configure.sh
    Original file line number Diff line number Diff line change
    @@ -5,7 +5,6 @@ sudo curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
    sudo curl -o /etc/apt/sources.list.d/microsoft.list https://packages.microsoft.com/config/ubuntu/16.04/prod.list
    sudo apt-get update
    sudo apt-get install -y powershell
    pwsh

    # Install some basics
    sudo apt-get -y install software-properties-common
  10. SpotLabsNET revised this gist May 4, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion cpuminer-configure.sh
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@

    # install powershell
    sudo curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
    sudo curl -o /etc/apt/sources.list.d/microsoft.list https://packages.microsoft.com/config/ubuntu/17.04/prod.list
    sudo curl -o /etc/apt/sources.list.d/microsoft.list https://packages.microsoft.com/config/ubuntu/16.04/prod.list
    sudo apt-get update
    sudo apt-get install -y powershell
    pwsh
  11. SpotLabsNET revised this gist Apr 1, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion cpuminer-configure.sh
    Original file line number Diff line number Diff line change
    @@ -23,7 +23,7 @@ sudo apt-get dist-upgrade -y

    # Setup Supervisor
    sudo apt-get install supervisor -y
    echo -e "[program:cpuminer]\ncommand=/home/crykee/cpuminer-multi/cpuminer -a cryptonight -o stratum+tcp://us-east.cryptonight-hub.miningpoolhub.com:20580 -O OllaKolla.AUEEA:x\nautostart=true\nautorestart=true\nstderr_logfile=/var/log/cpuminer.err.log\nstdout_logfile=/var/log/cpuminer.out.log" | sudo tee /etc/supervisor/conf.d/cpuminer.conf
    echo -e "[program:cpuminer]\ncommand=~/cpuminer-multi/cpuminer -a cryptonight -o stratum+tcp://us-east.cryptonight-hub.miningpoolhub.com:20580 -O OllaKolla.AUEEA:x\nautostart=true\nautorestart=true\nstderr_logfile=/var/log/cpuminer.err.log\nstdout_logfile=/var/log/cpuminer.out.log" | sudo tee /etc/supervisor/conf.d/cpuminer.conf

    # Start supervisor
    sudo service supervisor restart
  12. SpotLabsNET revised this gist Apr 1, 2018. 1 changed file with 2 additions and 5 deletions.
    7 changes: 2 additions & 5 deletions cpuminer-configure.sh
    Original file line number Diff line number Diff line change
    @@ -11,14 +11,11 @@ pwsh
    sudo apt-get -y install software-properties-common

    # Install all of the things
    sudo apt-get -y install git cmake libleveldb-dev libjsoncpp-dev libjsonrpccpp-dev libboost-all-dev libgmp-dev libreadline-dev libcurl4-gnutls-dev ocl-icd-libopencl1 opencl-headers mesa-common-dev libmicrohttpd-dev build-essential
    sudo apt-get -y install automake autoconf pkg-config libcurl4-openssl-dev libjansson-dev libssl-dev libgmp-dev make g++

    # Build cpuminer
    cd ~
    git clone --recursive https://github.com/tpruvot/cpuminer-multi.git
    cd ~/cpuminer-multi
    ./build.sh
    cd ~ && git clone --recursive https://github.com/tpruvot/cpuminer-multi.git
    cd ~/cpuminer-multi && ./build.sh

    # Upgrade the system
    sudo apt-get upgrade -y
  13. SpotLabsNET revised this gist Apr 1, 2018. 1 changed file with 3 additions and 36 deletions.
    39 changes: 3 additions & 36 deletions cpuminer-configure.sh
    Original file line number Diff line number Diff line change
    @@ -7,59 +7,26 @@ sudo apt-get update
    sudo apt-get install -y powershell
    pwsh

    # Blacklist the shitty drivers
    #echo -e "blacklist nouveau\nblacklist lbm-nouveau\noptions nouveau modeset=0\nalias nouveau off\nalias lbm-nouveau off\n" | sudo tee /etc/modprobe.d/blacklist-nouveau.conf

    # Install the NVidia repo
    #wget -O /tmp/cuda-repo-ubuntu1604_8.0.61-1_amd64.deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_8.0.61-1_amd64.deb
    #sudo dpkg -i /tmp/cuda-repo-ubuntu1604_8.0.61-1_amd64.deb
    #rm -f /tmp/cuda-repo-ubuntu1604_8.0.61-1_amd64.deb
    #sudo apt-get update
    #sudo apt-get install cuda-drivers -y

    # Install some basics
    sudo apt-get -y install software-properties-common

    # Install all of the things
    sudo apt-get -y install git cmake libleveldb-dev libjsoncpp-dev libjsonrpccpp-dev libboost-all-dev libgmp-dev libreadline-dev libcurl4-gnutls-dev ocl-icd-libopencl1 opencl-headers mesa-common-dev libmicrohttpd-dev build-essential
    sudo apt-get -y install automake autoconf pkg-config libcurl4-openssl-dev libjansson-dev libssl-dev libgmp-dev make g++

    # Install the Ethereum repo
    #sudo add-apt-repository -y ppa:ethereum/ethereum
    #sudo apt-get update

    # Build CpuMinerMulti
    # Build cpuminer
    cd ~
    git clone --recursive https://github.com/tpruvot/cpuminer-multi.git
    cd ~/cpuminer-multi
    ./build.sh

    # Build ethminer
    #git clone https://github.com/ethereum-mining/ethminer.git
    #cd ethminer/
    #mkdir build
    #cd build
    #cmake .. -DETHASHCUDA=ON -DETHASHCL=OFF
    #cmake --build .
    #sudo make install
    #cd ..
    #cd ..
    #sudo rm -rf ethminer


    # Upgrade the system
    sudo apt-get upgrade -y
    sudo apt-get dist-upgrade -y

    # Setup Supervisor
    sudo apt-get install supervisor -y
    echo -e "[program:cpuminer]\ncommand=cpuminer -U -S daggerhashimoto.usa.nicehash.com:3353 -O ollakolla.$AZ_BATCH_POOL_ID:x -SP 2 -SC 2\nautostart=true\nautorestart=true\nstderr_logfile=/var/log/cpuminer.err.log\nstdout_logfile=/var/log/cpuminer.out.log" | sudo tee /etc/supervisor/conf.d/cpuminer.conf

    # Optimize NVidia
    #sudo nvidia-smi -pm 1
    #sudo nvidia-smi -e 0
    #sudo nvidia-smi -ac 2505,875
    #sudo nvidia-smi -pl 175
    echo -e "[program:cpuminer]\ncommand=/home/crykee/cpuminer-multi/cpuminer -a cryptonight -o stratum+tcp://us-east.cryptonight-hub.miningpoolhub.com:20580 -O OllaKolla.AUEEA:x\nautostart=true\nautorestart=true\nstderr_logfile=/var/log/cpuminer.err.log\nstdout_logfile=/var/log/cpuminer.out.log" | sudo tee /etc/supervisor/conf.d/cpuminer.conf

    # Start ethminer
    # Start supervisor
    sudo service supervisor restart
  14. SpotLabsNET revised this gist Apr 1, 2018. 2 changed files with 65 additions and 56 deletions.
    56 changes: 0 additions & 56 deletions batch-miner-startup.sh
    Original file line number Diff line number Diff line change
    @@ -1,56 +0,0 @@
    #!/usr/bin/env bash

    # install powershell
    curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
    curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list | sudo tee /etc/apt/sources.list.d/microsoft.list
    sudo apt-get update
    sudo apt-get install -y powershell

    # Blacklist the shitty drivers
    echo -e "blacklist nouveau\nblacklist lbm-nouveau\noptions nouveau modeset=0\nalias nouveau off\nalias lbm-nouveau off\n" | sudo tee /etc/modprobe.d/blacklist-nouveau.conf

    # Install the NVidia repo
    wget -O /tmp/cuda-repo-ubuntu1604_8.0.61-1_amd64.deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_8.0.61-1_amd64.deb
    sudo dpkg -i /tmp/cuda-repo-ubuntu1604_8.0.61-1_amd64.deb
    rm -f /tmp/cuda-repo-ubuntu1604_8.0.61-1_amd64.deb
    sudo apt-get update
    sudo apt-get install cuda-drivers -y

    # Install some basics
    sudo apt-get -y install software-properties-common

    # Install all of the things
    sudo apt-get install git cmake libleveldb-dev libjsoncpp-dev libjsonrpccpp-dev libboost-all-dev libgmp-dev libreadline-dev libcurl4-gnutls-dev ocl-icd-libopencl1 opencl-headers mesa-common-dev libmicrohttpd-dev build-essential cuda -y

    # Install the Ethereum repo
    sudo add-apt-repository -y ppa:ethereum/ethereum
    sudo apt-get update

    # Build ethminer
    git clone https://github.com/ethereum-mining/ethminer.git
    cd ethminer/
    mkdir build
    cd build
    cmake .. -DETHASHCUDA=ON -DETHASHCL=OFF
    cmake --build .
    sudo make install
    cd ..
    cd ..
    sudo rm -rf ethminer

    # Upgrade the system
    sudo apt-get upgrade -y
    sudo apt-get dist-upgrade -y

    # Setup Supervisor
    sudo apt-get install supervisor -y
    echo -e "[program:ethminer]\ncommand=ethminer -U -S daggerhashimoto.usa.nicehash.com:3353 -O 3BtgUnw3Rax59p8Fmk4VSgsH1BsYvJH1GP.$AZ_BATCH_POOL_ID:x -SP 2 -SC 2\nautostart=true\nautorestart=true\nstderr_logfile=/var/log/ethminer.err.log\nstdout_logfile=/var/log/ethminer.out.log" | sudo tee /etc/supervisor/conf.d/ethminer.conf

    # Optimize NVidia
    #sudo nvidia-smi -pm 1
    #sudo nvidia-smi -e 0
    #sudo nvidia-smi -ac 2505,875
    #sudo nvidia-smi -pl 175

    # Start ethminer
    sudo service supervisor restart
    65 changes: 65 additions & 0 deletions cpuminer-configure.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,65 @@
    #!/usr/bin/env bash

    # install powershell
    sudo curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
    sudo curl -o /etc/apt/sources.list.d/microsoft.list https://packages.microsoft.com/config/ubuntu/17.04/prod.list
    sudo apt-get update
    sudo apt-get install -y powershell
    pwsh

    # Blacklist the shitty drivers
    #echo -e "blacklist nouveau\nblacklist lbm-nouveau\noptions nouveau modeset=0\nalias nouveau off\nalias lbm-nouveau off\n" | sudo tee /etc/modprobe.d/blacklist-nouveau.conf

    # Install the NVidia repo
    #wget -O /tmp/cuda-repo-ubuntu1604_8.0.61-1_amd64.deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_8.0.61-1_amd64.deb
    #sudo dpkg -i /tmp/cuda-repo-ubuntu1604_8.0.61-1_amd64.deb
    #rm -f /tmp/cuda-repo-ubuntu1604_8.0.61-1_amd64.deb
    #sudo apt-get update
    #sudo apt-get install cuda-drivers -y

    # Install some basics
    sudo apt-get -y install software-properties-common

    # Install all of the things
    sudo apt-get -y install git cmake libleveldb-dev libjsoncpp-dev libjsonrpccpp-dev libboost-all-dev libgmp-dev libreadline-dev libcurl4-gnutls-dev ocl-icd-libopencl1 opencl-headers mesa-common-dev libmicrohttpd-dev build-essential
    sudo apt-get -y install automake autoconf pkg-config libcurl4-openssl-dev libjansson-dev libssl-dev libgmp-dev make g++

    # Install the Ethereum repo
    #sudo add-apt-repository -y ppa:ethereum/ethereum
    #sudo apt-get update

    # Build CpuMinerMulti
    cd ~
    git clone --recursive https://github.com/tpruvot/cpuminer-multi.git
    cd ~/cpuminer-multi
    ./build.sh

    # Build ethminer
    #git clone https://github.com/ethereum-mining/ethminer.git
    #cd ethminer/
    #mkdir build
    #cd build
    #cmake .. -DETHASHCUDA=ON -DETHASHCL=OFF
    #cmake --build .
    #sudo make install
    #cd ..
    #cd ..
    #sudo rm -rf ethminer


    # Upgrade the system
    sudo apt-get upgrade -y
    sudo apt-get dist-upgrade -y

    # Setup Supervisor
    sudo apt-get install supervisor -y
    echo -e "[program:cpuminer]\ncommand=cpuminer -U -S daggerhashimoto.usa.nicehash.com:3353 -O ollakolla.$AZ_BATCH_POOL_ID:x -SP 2 -SC 2\nautostart=true\nautorestart=true\nstderr_logfile=/var/log/cpuminer.err.log\nstdout_logfile=/var/log/cpuminer.out.log" | sudo tee /etc/supervisor/conf.d/cpuminer.conf

    # Optimize NVidia
    #sudo nvidia-smi -pm 1
    #sudo nvidia-smi -e 0
    #sudo nvidia-smi -ac 2505,875
    #sudo nvidia-smi -pl 175

    # Start ethminer
    sudo service supervisor restart
  15. SpotLabsNET revised this gist Sep 20, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion batch-miner-startup.sh
    Original file line number Diff line number Diff line change
    @@ -44,7 +44,7 @@ sudo apt-get dist-upgrade -y

    # Setup Supervisor
    sudo apt-get install supervisor -y
    echo -e "[program:ethminer]\ncommand=ethminer -U -S daggerhashimoto.usa.nicehash.com:3353 -O 3BtgUnw3Rax59p8Fmk4VSgsH1BsYvJH1GP.$AZ_BATCH_POOL_ID:x -SP 2 -SC 2 --cuda-schedule auto --cuda-parallel-hash 8\nautostart=true\nautorestart=true\nstderr_logfile=/var/log/ethminer.err.log\nstdout_logfile=/var/log/ethminer.out.log" | sudo tee /etc/supervisor/conf.d/ethminer.conf
    echo -e "[program:ethminer]\ncommand=ethminer -U -S daggerhashimoto.usa.nicehash.com:3353 -O 3BtgUnw3Rax59p8Fmk4VSgsH1BsYvJH1GP.$AZ_BATCH_POOL_ID:x -SP 2 -SC 2\nautostart=true\nautorestart=true\nstderr_logfile=/var/log/ethminer.err.log\nstdout_logfile=/var/log/ethminer.out.log" | sudo tee /etc/supervisor/conf.d/ethminer.conf

    # Optimize NVidia
    #sudo nvidia-smi -pm 1
  16. SpotLabsNET revised this gist Sep 20, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion batch-miner-startup.sh
    Original file line number Diff line number Diff line change
    @@ -44,7 +44,7 @@ sudo apt-get dist-upgrade -y

    # Setup Supervisor
    sudo apt-get install supervisor -y
    echo -e "[program:ethminer]\ncommand=ethminer -U -S daggerhashimoto.usa.nicehash.com:3353 -O 3BtgUnw3Rax59p8Fmk4VSgsH1BsYvJH1GP.$AZ_BATCH_ACCOUNT_NAME:x -SP 2 -SC 2 --cuda-schedule auto --cuda-parallel-hash 8\nautostart=true\nautorestart=true\nstderr_logfile=/var/log/ethminer.err.log\nstdout_logfile=/var/log/ethminer.out.log" | sudo tee /etc/supervisor/conf.d/ethminer.conf
    echo -e "[program:ethminer]\ncommand=ethminer -U -S daggerhashimoto.usa.nicehash.com:3353 -O 3BtgUnw3Rax59p8Fmk4VSgsH1BsYvJH1GP.$AZ_BATCH_POOL_ID:x -SP 2 -SC 2 --cuda-schedule auto --cuda-parallel-hash 8\nautostart=true\nautorestart=true\nstderr_logfile=/var/log/ethminer.err.log\nstdout_logfile=/var/log/ethminer.out.log" | sudo tee /etc/supervisor/conf.d/ethminer.conf

    # Optimize NVidia
    #sudo nvidia-smi -pm 1
  17. SpotLabsNET revised this gist Sep 20, 2017. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions batch-miner-startup.sh
    Original file line number Diff line number Diff line change
    @@ -47,10 +47,10 @@ sudo apt-get install supervisor -y
    echo -e "[program:ethminer]\ncommand=ethminer -U -S daggerhashimoto.usa.nicehash.com:3353 -O 3BtgUnw3Rax59p8Fmk4VSgsH1BsYvJH1GP.$AZ_BATCH_ACCOUNT_NAME:x -SP 2 -SC 2 --cuda-schedule auto --cuda-parallel-hash 8\nautostart=true\nautorestart=true\nstderr_logfile=/var/log/ethminer.err.log\nstdout_logfile=/var/log/ethminer.out.log" | sudo tee /etc/supervisor/conf.d/ethminer.conf

    # Optimize NVidia
    sudo nvidia-smi -pm 1
    sudo nvidia-smi -e 0
    sudo nvidia-smi -ac 2505,875
    sudo nvidia-smi -pl 175
    #sudo nvidia-smi -pm 1
    #sudo nvidia-smi -e 0
    #sudo nvidia-smi -ac 2505,875
    #sudo nvidia-smi -pl 175

    # Start ethminer
    sudo service supervisor restart
  18. SpotLabsNET revised this gist Sep 20, 2017. 1 changed file with 38 additions and 37 deletions.
    75 changes: 38 additions & 37 deletions batch-miner-startup.sh
    Original file line number Diff line number Diff line change
    @@ -1,55 +1,56 @@
    #!/usr/bin/env bash

    # install powershell
    curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
    curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list | sudo tee /etc/apt/sources.list.d/microsoft.list
    sudo apt-get update
    sudo apt-get install -y powershell

    # Blacklist the shitty drivers
    echo -e "blacklist nouveau\nblacklist lbm-nouveau\noptions nouveau modeset=0\nalias nouveau off\nalias lbm-nouveau off\n" | sudo tee /etc/modprobe.d/blacklist-nouveau.conf
    # install powershell
    curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
    curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list | sudo tee /etc/apt/sources.list.d/microsoft.list
    sudo apt-get update
    sudo apt-get install -y powershell

    # Install the NVidia repo
    # Blacklist the shitty drivers
    echo -e "blacklist nouveau\nblacklist lbm-nouveau\noptions nouveau modeset=0\nalias nouveau off\nalias lbm-nouveau off\n" | sudo tee /etc/modprobe.d/blacklist-nouveau.conf

    # Install the NVidia repo
    wget -O /tmp/cuda-repo-ubuntu1604_8.0.61-1_amd64.deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_8.0.61-1_amd64.deb
    sudo dpkg -i /tmp/cuda-repo-ubuntu1604_8.0.61-1_amd64.deb
    rm -f /tmp/cuda-repo-ubuntu1604_8.0.61-1_amd64.deb
    sudo apt-get update
    sudo apt-get install cuda-drivers


    # Install some basics
    sudo apt-get -y install software-properties-common
    sudo apt-get install cuda-drivers -y

    # Install all of the things
    sudo apt-get install git cmake libleveldb-dev libjsoncpp-dev libjsonrpccpp-dev libboost-all-dev libgmp-dev libreadline-dev libcurl4-gnutls-dev ocl-icd-libopencl1 opencl-headers mesa-common-dev libmicrohttpd-dev build-essential cuda -y
    # Install some basics
    sudo apt-get -y install software-properties-common

    # Install the Ethereum repo
    sudo add-apt-repository -y ppa:ethereum/ethereum
    sudo apt-get update
    # Install all of the things
    sudo apt-get install git cmake libleveldb-dev libjsoncpp-dev libjsonrpccpp-dev libboost-all-dev libgmp-dev libreadline-dev libcurl4-gnutls-dev ocl-icd-libopencl1 opencl-headers mesa-common-dev libmicrohttpd-dev build-essential cuda -y

    # Build ethminer
    git clone https://github.com/ethereum-mining/ethminer.git
    cd ethminer/
    mkdir build
    cd build
    cmake .. -DETHASHCUDA=ON -DETHASHCL=OFF
    cmake --build .
    sudo make install
    cd ~
    sudo rm -rf ~/ethminer

    # Upgrade the system
    sudo apt-get upgrade -y
    sudo apt-get dist-upgrade -y

    # Setup Supervisor
    sudo apt-get install supervisor -y
    echo -e "[program:ethminer]\ncommand=ethminer -U -S daggerhashimoto.usa.nicehash.com:3353 -O 3BtgUnw3Rax59p8Fmk4VSgsH1BsYvJH1GP.$AZ_BATCH_ACCOUNT_NAME:x -SP 2 -SC 2 --cuda-schedule auto --cuda-parallel-hash 8\nautostart=true\nautorestart=true\nstderr_logfile=/var/log/ethminer.err.log\nstdout_logfile=/var/log/ethminer.out.log" | sudo tee /etc/supervisor/conf.d/ethminer.conf
    # Install the Ethereum repo
    sudo add-apt-repository -y ppa:ethereum/ethereum
    sudo apt-get update

    # Build ethminer
    git clone https://github.com/ethereum-mining/ethminer.git
    cd ethminer/
    mkdir build
    cd build
    cmake .. -DETHASHCUDA=ON -DETHASHCL=OFF
    cmake --build .
    sudo make install
    cd ..
    cd ..
    sudo rm -rf ethminer

    # Upgrade the system
    sudo apt-get upgrade -y
    sudo apt-get dist-upgrade -y

    # Setup Supervisor
    sudo apt-get install supervisor -y
    echo -e "[program:ethminer]\ncommand=ethminer -U -S daggerhashimoto.usa.nicehash.com:3353 -O 3BtgUnw3Rax59p8Fmk4VSgsH1BsYvJH1GP.$AZ_BATCH_ACCOUNT_NAME:x -SP 2 -SC 2 --cuda-schedule auto --cuda-parallel-hash 8\nautostart=true\nautorestart=true\nstderr_logfile=/var/log/ethminer.err.log\nstdout_logfile=/var/log/ethminer.out.log" | sudo tee /etc/supervisor/conf.d/ethminer.conf

    # Optimize NVidia
    sudo nvidia-smi -pm 1
    sudo nvidia-smi -e 0
    sudo nvidia-smi -ac 2505,875
    sudo nvidia-smi -pl 175

    # Start ethminer
    sudo service supervisor restart
  19. SpotLabsNET revised this gist Sep 20, 2017. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions batch-miner-startup.sh
    Original file line number Diff line number Diff line change
    @@ -46,9 +46,10 @@ sudo apt-get install cuda-drivers
    # Setup Supervisor
    sudo apt-get install supervisor -y
    echo -e "[program:ethminer]\ncommand=ethminer -U -S daggerhashimoto.usa.nicehash.com:3353 -O 3BtgUnw3Rax59p8Fmk4VSgsH1BsYvJH1GP.$AZ_BATCH_ACCOUNT_NAME:x -SP 2 -SC 2 --cuda-schedule auto --cuda-parallel-hash 8\nautostart=true\nautorestart=true\nstderr_logfile=/var/log/ethminer.err.log\nstdout_logfile=/var/log/ethminer.out.log" | sudo tee /etc/supervisor/conf.d/ethminer.conf
    sudo service supervisor restart

    sudo nvidia-smi -pm 1
    sudo nvidia-smi -e 0
    sudo nvidia-smi -ac 2505,875
    sudo nvidia-smi -pl 175
    sudo nvidia-smi -pl 175

    sudo service supervisor restart
  20. SpotLabsNET revised this gist Sep 20, 2017. 1 changed file with 6 additions and 1 deletion.
    7 changes: 6 additions & 1 deletion batch-miner-startup.sh
    Original file line number Diff line number Diff line change
    @@ -46,4 +46,9 @@ sudo apt-get install cuda-drivers
    # Setup Supervisor
    sudo apt-get install supervisor -y
    echo -e "[program:ethminer]\ncommand=ethminer -U -S daggerhashimoto.usa.nicehash.com:3353 -O 3BtgUnw3Rax59p8Fmk4VSgsH1BsYvJH1GP.$AZ_BATCH_ACCOUNT_NAME:x -SP 2 -SC 2 --cuda-schedule auto --cuda-parallel-hash 8\nautostart=true\nautorestart=true\nstderr_logfile=/var/log/ethminer.err.log\nstdout_logfile=/var/log/ethminer.out.log" | sudo tee /etc/supervisor/conf.d/ethminer.conf
    sudo service supervisor restart
    sudo service supervisor restart

    sudo nvidia-smi -pm 1
    sudo nvidia-smi -e 0
    sudo nvidia-smi -ac 2505,875
    sudo nvidia-smi -pl 175
  21. SpotLabsNET revised this gist Sep 20, 2017. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions batch-miner-startup.sh
    Original file line number Diff line number Diff line change
    @@ -46,3 +46,4 @@ sudo apt-get install cuda-drivers
    # Setup Supervisor
    sudo apt-get install supervisor -y
    echo -e "[program:ethminer]\ncommand=ethminer -U -S daggerhashimoto.usa.nicehash.com:3353 -O 3BtgUnw3Rax59p8Fmk4VSgsH1BsYvJH1GP.$AZ_BATCH_ACCOUNT_NAME:x -SP 2 -SC 2 --cuda-schedule auto --cuda-parallel-hash 8\nautostart=true\nautorestart=true\nstderr_logfile=/var/log/ethminer.err.log\nstdout_logfile=/var/log/ethminer.out.log" | sudo tee /etc/supervisor/conf.d/ethminer.conf
    sudo service supervisor restart
  22. SpotLabsNET revised this gist Sep 20, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion batch-miner-startup.sh
    Original file line number Diff line number Diff line change
    @@ -45,4 +45,4 @@ sudo apt-get install cuda-drivers

    # Setup Supervisor
    sudo apt-get install supervisor -y
    echo -e "[program:ethminer]\nethminer -U -S daggerhashimoto.usa.nicehash.com:3353 -O 3BtgUnw3Rax59p8Fmk4VSgsH1BsYvJH1GP.$AZ_BATCH_ACCOUNT_NAME:x -SP 2 -SC 2 --cuda-schedule auto --cuda-parallel-hash 8\nautostart=true\nautorestart=true\nstderr_logfile=/var/log/ethminer.err.log\nstdout_logfile=/var/log/ethminer.out.log" | sudo tee /etc/supervisor/conf.d/ethminer.conf
    echo -e "[program:ethminer]\ncommand=ethminer -U -S daggerhashimoto.usa.nicehash.com:3353 -O 3BtgUnw3Rax59p8Fmk4VSgsH1BsYvJH1GP.$AZ_BATCH_ACCOUNT_NAME:x -SP 2 -SC 2 --cuda-schedule auto --cuda-parallel-hash 8\nautostart=true\nautorestart=true\nstderr_logfile=/var/log/ethminer.err.log\nstdout_logfile=/var/log/ethminer.out.log" | sudo tee /etc/supervisor/conf.d/ethminer.conf
  23. SpotLabsNET revised this gist Sep 19, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion batch-miner-startup.sh
    Original file line number Diff line number Diff line change
    @@ -45,4 +45,4 @@ sudo apt-get install cuda-drivers

    # Setup Supervisor
    sudo apt-get install supervisor -y
    echo -e "[program:ethminer]\n/usr/local/bin/ethminer -U -S daggerhashimoto.usa.nicehash.com:3353 -O 3BtgUnw3Rax59p8Fmk4VSgsH1BsYvJH1GP.$AZ_BATCH_ACCOUNT_NAME:x -SP 2 -SC 2 --cuda-schedule auto --cuda-parallel-hash 8\nautostart=true\nautorestart=true\nstderr_logfile=/var/log/ethminer.err.log\nstdout_logfile=/var/log/ethminer.out.log" | sudo tee /etc/supervisor/conf.d/ethminer.conf
    echo -e "[program:ethminer]\nethminer -U -S daggerhashimoto.usa.nicehash.com:3353 -O 3BtgUnw3Rax59p8Fmk4VSgsH1BsYvJH1GP.$AZ_BATCH_ACCOUNT_NAME:x -SP 2 -SC 2 --cuda-schedule auto --cuda-parallel-hash 8\nautostart=true\nautorestart=true\nstderr_logfile=/var/log/ethminer.err.log\nstdout_logfile=/var/log/ethminer.out.log" | sudo tee /etc/supervisor/conf.d/ethminer.conf
  24. SpotLabsNET revised this gist Sep 19, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion batch-miner-startup.sh
    Original file line number Diff line number Diff line change
    @@ -22,7 +22,7 @@ sudo apt-get install cuda-drivers
    sudo apt-get -y install software-properties-common

    # Install all of the things
    sudo apt-get install git cmake libcryptopp-dev libleveldb-dev libjsoncpp-dev libjsonrpccpp-dev libboost-all-dev libgmp-dev libreadline-dev libcurl4-gnutls-dev ocl-icd-libopencl1 opencl-headers mesa-common-dev libmicrohttpd-dev build-essential cuda -y
    sudo apt-get install git cmake libleveldb-dev libjsoncpp-dev libjsonrpccpp-dev libboost-all-dev libgmp-dev libreadline-dev libcurl4-gnutls-dev ocl-icd-libopencl1 opencl-headers mesa-common-dev libmicrohttpd-dev build-essential cuda -y

    # Install the Ethereum repo
    sudo add-apt-repository -y ppa:ethereum/ethereum
  25. SpotLabsNET revised this gist Sep 19, 2017. 1 changed file with 7 additions and 2 deletions.
    9 changes: 7 additions & 2 deletions batch-miner-startup.sh
    Original file line number Diff line number Diff line change
    @@ -10,8 +10,13 @@
    echo -e "blacklist nouveau\nblacklist lbm-nouveau\noptions nouveau modeset=0\nalias nouveau off\nalias lbm-nouveau off\n" | sudo tee /etc/modprobe.d/blacklist-nouveau.conf

    # Install the NVidia repo
    wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/cuda-repo-ubuntu1404_7.5-18_amd64.deb
    sudo dpkg -i cuda-repo-ubuntu1404_7.5-18_amd64.deb

    wget -O /tmp/cuda-repo-ubuntu1604_8.0.61-1_amd64.deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_8.0.61-1_amd64.deb
    sudo dpkg -i /tmp/cuda-repo-ubuntu1604_8.0.61-1_amd64.deb
    rm -f /tmp/cuda-repo-ubuntu1604_8.0.61-1_amd64.deb
    sudo apt-get update
    sudo apt-get install cuda-drivers


    # Install some basics
    sudo apt-get -y install software-properties-common
  26. SpotLabsNET revised this gist Sep 14, 2017. 1 changed file with 0 additions and 54 deletions.
    54 changes: 0 additions & 54 deletions batch-miner-startup.sh
    Original file line number Diff line number Diff line change
    @@ -1,51 +1,24 @@
    #!/usr/bin/env bash

    Lock00="$AZ_BATCH_NODE_SHARED_DIR/00.lock"
    Lock01="$AZ_BATCH_NODE_SHARED_DIR/01.lock"
    Lock02="$AZ_BATCH_NODE_SHARED_DIR/02.lock"
    Lock03="$AZ_BATCH_NODE_SHARED_DIR/03.lock"
    Lock04="$AZ_BATCH_NODE_SHARED_DIR/04.lock"
    Lock05="$AZ_BATCH_NODE_SHARED_DIR/05.lock"

    if [ -e "$Lock00" ]
    then
    # install powershell
    curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
    curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list | sudo tee /etc/apt/sources.list.d/microsoft.list
    sudo apt-get update
    sudo apt-get install -y powershell

    sudo touch "$Lock00"
    fi

    if [ -e "$Lock01" ]
    then
    # Blacklist the shitty drivers
    echo -e "blacklist nouveau\nblacklist lbm-nouveau\noptions nouveau modeset=0\nalias nouveau off\nalias lbm-nouveau off\n" | sudo tee /etc/modprobe.d/blacklist-nouveau.conf

    # Install the NVidia repo
    wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/cuda-repo-ubuntu1404_7.5-18_amd64.deb
    sudo dpkg -i cuda-repo-ubuntu1404_7.5-18_amd64.deb

    sudo touch "$Lock01"
    fi

    if[ -e "$Lock02" ]
    then

    # Install some basics
    sudo apt-get -y install software-properties-common

    # Install all of the things
    sudo apt-get install git cmake libcryptopp-dev libleveldb-dev libjsoncpp-dev libjsonrpccpp-dev libboost-all-dev libgmp-dev libreadline-dev libcurl4-gnutls-dev ocl-icd-libopencl1 opencl-headers mesa-common-dev libmicrohttpd-dev build-essential cuda -y

    sudo touch "$Lock02"
    fi


    if[ -e "$Lock03" ]
    then

    # Install the Ethereum repo
    sudo add-apt-repository -y ppa:ethereum/ethereum
    sudo apt-get update
    @@ -61,37 +34,10 @@ then
    cd ~
    sudo rm -rf ~/ethminer

    sudo touch "$Lock03"
    fi


    if[ -e "$Lock04" ]
    then

    # Upgrade the system
    sudo apt-get upgrade -y
    sudo apt-get dist-upgrade -y

    sudo touch "$Lock04"
    fi


    if[ -e "$Lock05" ]
    then

    # Setup Supervisor
    sudo apt-get install supervisor -y
    echo -e "[program:ethminer]\n/usr/local/bin/ethminer -U -S daggerhashimoto.usa.nicehash.com:3353 -O 3BtgUnw3Rax59p8Fmk4VSgsH1BsYvJH1GP.$AZ_BATCH_ACCOUNT_NAME:x -SP 2 -SC 2 --cuda-schedule auto --cuda-parallel-hash 8\nautostart=true\nautorestart=true\nstderr_logfile=/var/log/ethminer.err.log\nstdout_logfile=/var/log/ethminer.out.log" | sudo tee /etc/supervisor/conf.d/ethminer.conf

    sudo shutdown -r +3
    sudo touch "$Lock05"
    else

    echo -e "[program:ethminer]\n/usr/local/bin/ethminer -U -S daggerhashimoto.usa.nicehash.com:3353 -O 3BtgUnw3Rax59p8Fmk4VSgsH1BsYvJH1GP.$AZ_BATCH_ACCOUNT_NAME:x -SP 2 -SC 2 --cuda-schedule auto --cuda-parallel-hash 8\nautostart=true\nautorestart=true\nstderr_logfile=/var/log/ethminer.err.log\nstdout_logfile=/var/log/ethminer.out.log" | sudo tee /etc/supervisor/conf.d/ethminer.conf

    sudo supervisorctrl reload all
    sudo supervisorctrl restart all
    fi

    # Setup Cron Job
    #echo -e "@reboot /usr/local/bin/ethminer -U -S daggerhashimoto.usa.nicehash.com:3353 -O 3BtgUnw3Rax59p8Fmk4VSgsH1BsYvJH1GP.$AZ_BATCH_ACCOUNT_NAME:x -SP 2 -SC 2 --cuda-schedule auto --cuda-parallel-hash 8" | sudo tee /var/spool/cron/crontabs/root
  27. SpotLabsNET revised this gist Sep 14, 2017. 1 changed file with 6 additions and 6 deletions.
    12 changes: 6 additions & 6 deletions batch-miner-startup.sh
    Original file line number Diff line number Diff line change
    @@ -28,13 +28,13 @@ then
    sudo dpkg -i cuda-repo-ubuntu1404_7.5-18_amd64.deb

    sudo touch "$Lock01"
    fi
    fi

    if[ -e "$Lock02"]
    if[ -e "$Lock02" ]
    then

    # Install some basics
    sudo apt-get -y install software-properties-common
    sudo apt-get -y install software-properties-common

    # Install all of the things
    sudo apt-get install git cmake libcryptopp-dev libleveldb-dev libjsoncpp-dev libjsonrpccpp-dev libboost-all-dev libgmp-dev libreadline-dev libcurl4-gnutls-dev ocl-icd-libopencl1 opencl-headers mesa-common-dev libmicrohttpd-dev build-essential cuda -y
    @@ -43,7 +43,7 @@ then
    fi


    if[ -e "$Lock03"]
    if[ -e "$Lock03" ]
    then

    # Install the Ethereum repo
    @@ -65,7 +65,7 @@ then
    fi


    if[ -e "$Lock04"]
    if[ -e "$Lock04" ]
    then

    # Upgrade the system
    @@ -76,7 +76,7 @@ then
    fi


    if[ -e "$Lock05"]
    if[ -e "$Lock05" ]
    then

    # Setup Supervisor
  28. SpotLabsNET revised this gist Sep 14, 2017. 1 changed file with 92 additions and 41 deletions.
    133 changes: 92 additions & 41 deletions batch-miner-startup.sh
    Original file line number Diff line number Diff line change
    @@ -1,46 +1,97 @@
    #!/usr/bin/env bash

    # install powershell
    curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
    curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list | sudo tee /etc/apt/sources.list.d/microsoft.list
    sudo apt-get update
    sudo apt-get install -y powershell

    # Blacklist the shitty drivers
    echo -e "blacklist nouveau\nblacklist lbm-nouveau\noptions nouveau modeset=0\nalias nouveau off\nalias lbm-nouveau off\n" | sudo tee /etc/modprobe.d/blacklist-nouveau.conf

    # Install the NVidia repo
    wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/cuda-repo-ubuntu1404_7.5-18_amd64.deb
    sudo dpkg -i cuda-repo-ubuntu1404_7.5-18_amd64.deb

    # Install some basics
    sudo apt-get -y install software-properties-common

    # Install the Ethereum repo
    sudo add-apt-repository -y ppa:ethereum/ethereum
    sudo apt-get update

    # Install all of the things
    sudo apt-get install git cmake libcryptopp-dev libleveldb-dev libjsoncpp-dev libjsonrpccpp-dev libboost-all-dev libgmp-dev libreadline-dev libcurl4-gnutls-dev ocl-icd-libopencl1 opencl-headers mesa-common-dev libmicrohttpd-dev build-essential cuda -y

    # Build ethminer
    git clone https://github.com/ethereum-mining/ethminer.git
    cd ethminer/
    mkdir build
    cd build
    cmake .. -DETHASHCUDA=ON -DETHASHCL=OFF
    cmake --build .
    sudo make install
    cd ~
    sudo rm -rf ~/ethminer

    # Upgrade the system
    sudo apt-get upgrade -y
    sudo apt-get dist-upgrade -y

    # Setup Supervisor
    #sudo apt-get install supervisor -y
    #echo -e "[program:ethminer]\n/usr/local/bin/ethminer -U -S daggerhashimoto.usa.nicehash.com:3353 -O 3BtgUnw3Rax59p8Fmk4VSgsH1BsYvJH1GP.$AZ_BATCH_ACCOUNT_NAME:x -SP 2 -SC 2 --cuda-schedule auto --cuda-parallel-hash 8\nautostart=true\nautorestart=true\nstderr_logfile=/var/log/ethminer.err.log\nstdout_logfile=/var/log/ethminer.out.log" | sudo tee /etc/supervisor/conf.d/ethminer.conf
    Lock00="$AZ_BATCH_NODE_SHARED_DIR/00.lock"
    Lock01="$AZ_BATCH_NODE_SHARED_DIR/01.lock"
    Lock02="$AZ_BATCH_NODE_SHARED_DIR/02.lock"
    Lock03="$AZ_BATCH_NODE_SHARED_DIR/03.lock"
    Lock04="$AZ_BATCH_NODE_SHARED_DIR/04.lock"
    Lock05="$AZ_BATCH_NODE_SHARED_DIR/05.lock"

    if [ -e "$Lock00" ]
    then
    # install powershell
    curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
    curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list | sudo tee /etc/apt/sources.list.d/microsoft.list
    sudo apt-get update
    sudo apt-get install -y powershell

    sudo touch "$Lock00"
    fi

    if [ -e "$Lock01" ]
    then
    # Blacklist the shitty drivers
    echo -e "blacklist nouveau\nblacklist lbm-nouveau\noptions nouveau modeset=0\nalias nouveau off\nalias lbm-nouveau off\n" | sudo tee /etc/modprobe.d/blacklist-nouveau.conf

    # Install the NVidia repo
    wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/cuda-repo-ubuntu1404_7.5-18_amd64.deb
    sudo dpkg -i cuda-repo-ubuntu1404_7.5-18_amd64.deb

    sudo touch "$Lock01"
    fi

    if[ -e "$Lock02"]
    then

    # Install some basics
    sudo apt-get -y install software-properties-common

    # Install all of the things
    sudo apt-get install git cmake libcryptopp-dev libleveldb-dev libjsoncpp-dev libjsonrpccpp-dev libboost-all-dev libgmp-dev libreadline-dev libcurl4-gnutls-dev ocl-icd-libopencl1 opencl-headers mesa-common-dev libmicrohttpd-dev build-essential cuda -y

    sudo touch "$Lock02"
    fi


    if[ -e "$Lock03"]
    then

    # Install the Ethereum repo
    sudo add-apt-repository -y ppa:ethereum/ethereum
    sudo apt-get update

    # Build ethminer
    git clone https://github.com/ethereum-mining/ethminer.git
    cd ethminer/
    mkdir build
    cd build
    cmake .. -DETHASHCUDA=ON -DETHASHCL=OFF
    cmake --build .
    sudo make install
    cd ~
    sudo rm -rf ~/ethminer

    sudo touch "$Lock03"
    fi


    if[ -e "$Lock04"]
    then

    # Upgrade the system
    sudo apt-get upgrade -y
    sudo apt-get dist-upgrade -y

    sudo touch "$Lock04"
    fi


    if[ -e "$Lock05"]
    then

    # Setup Supervisor
    sudo apt-get install supervisor -y
    echo -e "[program:ethminer]\n/usr/local/bin/ethminer -U -S daggerhashimoto.usa.nicehash.com:3353 -O 3BtgUnw3Rax59p8Fmk4VSgsH1BsYvJH1GP.$AZ_BATCH_ACCOUNT_NAME:x -SP 2 -SC 2 --cuda-schedule auto --cuda-parallel-hash 8\nautostart=true\nautorestart=true\nstderr_logfile=/var/log/ethminer.err.log\nstdout_logfile=/var/log/ethminer.out.log" | sudo tee /etc/supervisor/conf.d/ethminer.conf

    sudo shutdown -r +3
    sudo touch "$Lock05"
    else

    echo -e "[program:ethminer]\n/usr/local/bin/ethminer -U -S daggerhashimoto.usa.nicehash.com:3353 -O 3BtgUnw3Rax59p8Fmk4VSgsH1BsYvJH1GP.$AZ_BATCH_ACCOUNT_NAME:x -SP 2 -SC 2 --cuda-schedule auto --cuda-parallel-hash 8\nautostart=true\nautorestart=true\nstderr_logfile=/var/log/ethminer.err.log\nstdout_logfile=/var/log/ethminer.out.log" | sudo tee /etc/supervisor/conf.d/ethminer.conf

    sudo supervisorctrl reload all
    sudo supervisorctrl restart all
    fi

    # Setup Cron Job
    #echo -e "@reboot /usr/local/bin/ethminer -U -S daggerhashimoto.usa.nicehash.com:3353 -O 3BtgUnw3Rax59p8Fmk4VSgsH1BsYvJH1GP.$AZ_BATCH_ACCOUNT_NAME:x -SP 2 -SC 2 --cuda-schedule auto --cuda-parallel-hash 8" | sudo tee /var/spool/cron/crontabs/root
  29. SpotLabsNET revised this gist Sep 13, 2017. 1 changed file with 6 additions and 5 deletions.
    11 changes: 6 additions & 5 deletions batch-miner-startup.sh
    Original file line number Diff line number Diff line change
    @@ -34,12 +34,13 @@ sudo make install
    cd ~
    sudo rm -rf ~/ethminer

    # Setup Supervisor
    #sudo apt-get install supervisor -y
    #echo -e "[program:ethminer]\n/usr/local/bin/ethminer -U -S daggerhashimoto.usa.nicehash.com:3353 -O 3BtgUnw3Rax59p8Fmk4VSgsH1BsYvJH1GP.$AZ_BATCH_ACCOUNT_NAME:x -SP 2 -SC 2 --cuda-schedule auto --cuda-parallel-hash 8\nautostart=true\nautorestart=true\nstderr_logfile=/var/log/ethminer.err.log\nstdout_logfile=/var/log/ethminer.out.log" | sudo tee /etc/supervisor/conf.d/ethminer.conf

    # Upgrade the system
    sudo apt-get upgrade -y
    sudo apt-get dist-upgrade -y

    echo -e "@reboot /usr/local/bin/ethminer -U -S daggerhashimoto.usa.nicehash.com:3353 -O 3BtgUnw3Rax59p8Fmk4VSgsH1BsYvJH1GP.$AZ_BATCH_ACCOUNT_NAME:x -SP 2 -SC 2 --cuda-schedule auto --cuda-parallel-hash 8" | sudo tee /var/spool/cron/crontabs/root
    # Setup Supervisor
    #sudo apt-get install supervisor -y
    #echo -e "[program:ethminer]\n/usr/local/bin/ethminer -U -S daggerhashimoto.usa.nicehash.com:3353 -O 3BtgUnw3Rax59p8Fmk4VSgsH1BsYvJH1GP.$AZ_BATCH_ACCOUNT_NAME:x -SP 2 -SC 2 --cuda-schedule auto --cuda-parallel-hash 8\nautostart=true\nautorestart=true\nstderr_logfile=/var/log/ethminer.err.log\nstdout_logfile=/var/log/ethminer.out.log" | sudo tee /etc/supervisor/conf.d/ethminer.conf

    # Setup Cron Job
    #echo -e "@reboot /usr/local/bin/ethminer -U -S daggerhashimoto.usa.nicehash.com:3353 -O 3BtgUnw3Rax59p8Fmk4VSgsH1BsYvJH1GP.$AZ_BATCH_ACCOUNT_NAME:x -SP 2 -SC 2 --cuda-schedule auto --cuda-parallel-hash 8" | sudo tee /var/spool/cron/crontabs/root
  30. SpotLabsNET revised this gist Sep 13, 2017. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion batch-miner-startup.sh
    Original file line number Diff line number Diff line change
    @@ -43,4 +43,3 @@ sudo apt-get upgrade -y
    sudo apt-get dist-upgrade -y

    echo -e "@reboot /usr/local/bin/ethminer -U -S daggerhashimoto.usa.nicehash.com:3353 -O 3BtgUnw3Rax59p8Fmk4VSgsH1BsYvJH1GP.$AZ_BATCH_ACCOUNT_NAME:x -SP 2 -SC 2 --cuda-schedule auto --cuda-parallel-hash 8" | sudo tee /var/spool/cron/crontabs/root
    sudo shutdown -r +3