Created
January 4, 2019 06:00
-
-
Save joelallouz/2e4330dbf07015f02ddfae328b66c10b to your computer and use it in GitHub Desktop.
Grin miner install on Ubuntu 18.04.1 LTS Server - Cuda Setup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Install, build and RUN Grin — Then stop it | |
## install rust and dependencies | |
curl https://sh.rustup.rs -sSf | sh; source $HOME/.cargo/env | |
sudo apt install build-essential cmake git libgit2-dev clang libncurses5-dev libncursesw5-dev zlib1g-dev pkg-config libssl-dev llvm | |
## pull grin | |
git clone https://github.com/mimblewimble/grin.git | |
cd grin | |
cargo build --release | |
cd /target/release | |
./grin --floonet | |
##quit grin node | |
### INSTALL CUDA DRIVERS | |
sudo rm /etc/apt/sources.list.d/cuda* | |
sudo apt remove nvidia-cuda-toolkit | |
sudo apt remove nvidia-* | |
sudo apt update | |
sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub | |
sudo bash -c 'echo "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64 /" > /etc/apt/sources.list.d/cuda.list' | |
sudo apt update | |
sudo apt install nvidia-driver-410 | |
sudo apt install cuda-10-0 | |
# set PATH for cuda 10.0 installation | |
if [ -d "/usr/local/cuda-10.0/bin/" ]; then | |
export PATH=/usr/local/cuda-10.0/bin${PATH:+:${PATH}} | |
export LD_LIBRARY_PATH=/usr/local/cuda-10.0/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} | |
fi | |
## Test nvidia drivers | |
nvcc --version | |
##check you are picking up your nvidia cards | |
nvidia-smi | |
cd ~/ | |
git clone https://github.com/mimblewimble/grin-miner | |
cd grin-miner | |
git submodule update --init | |
### edit Cargo.toml to use cuda plugin | |
#uncomment this feature to enable cuda builds (cuda toolkit must be installed) | |
###features=["build-cuda-plugins"] | |
###FIX GCC for miner build | |
sudo update-alternatives --remove-all gcc | |
sudo update-alternatives --remove-all g++ | |
sudo apt-get install gcc-5 gcc-5 | |
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 10 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 10 sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 30 | |
sudo update-alternatives --set cc /usr/bin/gcc | |
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 30 | |
sudo update-alternatives --set c++ /usr/bin/g++ | |
cargo build | |
cp grin-miner.toml ~/grin-miner/target/debug/grin-miner.toml | |
cd /target/debug | |
###EDIT grin-miner.toml to use remote stratum server and cuda plugins | |
./grin-miner |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment