Skip to content

Instantly share code, notes, and snippets.

@SpotLabsNET
Last active May 4, 2018 15:53
Show Gist options
  • Save SpotLabsNET/ed5d8930351eb827f0ae2bdb3351cb8b to your computer and use it in GitHub Desktop.
Save SpotLabsNET/ed5d8930351eb827f0ae2bdb3351cb8b to your computer and use it in GitHub Desktop.
#!/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
# 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 ~
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]\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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment