Skip to content

Instantly share code, notes, and snippets.

@TravisMullen
Last active April 7, 2018 14:20
Show Gist options
  • Save TravisMullen/8ed60cd49dbe068fd3581a769e1dc3f1 to your computer and use it in GitHub Desktop.
Save TravisMullen/8ed60cd49dbe068fd3581a769e1dc3f1 to your computer and use it in GitHub Desktop.
Set-up nvidia cuda ccminer for multiple algos on Ubuntu 16.04 server.
#!/bin/bash -e
# Ubuntu Server 16.04.4 LTS
# The long-term support version of Ubuntu Server, including the Mitaka release of OpenStack and support guaranteed until April 2021 — 64-bit only.
# https://www.ubuntu.com/download/server/thank-you?version=16.04.4&architecture=amd64
sudo apt-get update && sudo apt-get upgrade -y
# nvidia drivers
sudo apt-get remove nvidia* && sudo apt-get autoremove -y
sudo add-apt-repository ppa:graphics-drivers/ppa -y
sudo apt-get update -y
# sudo ubuntu-drivers autoinstall
sudo apt-get install nvidia-390 -y
# CUDA 9.1
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_9.1.85-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu1604_9.1.85-1_amd64.deb
sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub
sudo apt-get update
sudo apt-get install cuda -y
# Install ccminer dependencies
sudo apt-get install libcurl4-openssl-dev libssl-dev libjansson-dev automake autotools-dev build-essential -y
# Ubuntu is now shipped with gcc 6 or 7 so please install gcc/g++ 5 and make it the default (required by the cuda toolkit)
sudo apt-get install gcc-5 g++-5 -y
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 1
git clone https://github.com/tpruvot/ccminer.git
cd ccminer
./autogen.sh
./configure
./build.sh
sudo cp ccminer /usr/bin/ccminer
#ssh only ports
# sudo apt-get install ufw -y
# sudo ufw allow ssh/tcp
# sudo ufw limit ssh/tcp
# sudo ufw logging on
# sudo ufw enable
# sleep 3
# sudo ufw start
# sleep 3
echo
echo
echo
# test card detection
nvidia-smi
echo
echo
echo "cciminer running from: $(which ccminer)"
echo
@TravisMullen
Copy link
Author

TravisMullen commented Apr 6, 2018

wget https://gist.githubusercontent.com/TravisMullen/8ed60cd49dbe068fd3581a769e1dc3f1/raw/e391c6fb5670dc0fbd575e279c217a620e5459f0/install_ccminer.sh && chmod +x install_ccminer.sh && sudo ./install_ccminer.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment