Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jpmx/46a156a5bf78eab0d1abb08f23b848a3 to your computer and use it in GitHub Desktop.
Save jpmx/46a156a5bf78eab0d1abb08f23b848a3 to your computer and use it in GitHub Desktop.
Mining Ravencoin with Enemy1.03 on Ubuntu
###From an Ubuntu 16.04 Instance with 20GB of HD space
###Update Ubuntu
sudo apt-get update
###Download Nvidia Software
wget https://developer.nvidia.com/compute/cuda/8.0/Prod2/local_installers/cuda_8.0.61_375.26_linux-run
mv cuda_8.0.61_375.26_linux-run cuda_8.0.61_375.26_linux.run
chmod +x cuda_8.0.61_375.26_linux.run
wget https://developer.nvidia.com/compute/cuda/8.0/Prod2/patches/2/cuda_8.0.61.2_linux-run
mv cuda_8.0.61.2_linux-run cuda_8.0.61.2_linux.run
chmod +x cuda_8.0.61.2_linux.run
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
###Download Tesla Drivers(For EC2 Instances)
wget http://us.download.nvidia.com/tesla/390.30/NVIDIA-Linux-x86_64-390.30.run
chmod +x NVIDIA-Linux-x86_64-390.30.run
-or-
###Download GeForce Drivers(For Retail products)
wget http://us.download.nvidia.com/XFree86/Linux-x86_64/390.42/NVIDIA-Linux-x86_64-390.42.run
chmod +x NVIDIA-Linux-x86_64-390.42.run
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
###Install prerequisites
sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get -y install libglib2.0-dev libgirepository1.0-dev asciidoc python-dev freeglut3-dev libx11-dev libxmu-dev libxi-dev libgl1-mesa-glx libglu1-mesa libglu1-mesa-dev gcc make libcurl4-openssl-dev autoconf git screen libncurses5-dev opencl-headers build-essential protobuf-compiler libprotoc-dev libboost-all-dev libleveldb-dev hdf5-tools libhdf5-serial-dev libopencv-core-dev libopencv-highgui-dev libsnappy-dev libsnappy1v5 libatlas-base-dev cmake libstdc++6-4.9-dbg libgoogle-glog0v5 libgoogle-glog-dev libgflags-dev liblmdb-dev python-pip gfortran libjansson-dev uthash-dev autogen libtool pkg-config gcc-multilib dkms libxml2-dev libxslt1-dev zlib1g-dev linux-image-extra-virtual libopencv-dev python-numpy libssl-dev automake autotools-dev
sudo apt-get -y autoremove
###disable Ubuntu Graphics
sudo touch /etc/modprobe.d/blacklist-nouveau.conf
sudo echo "blacklist nouveau" | sudo tee -a /etc/modprobe.d/blacklist-nouveau.conf
sudo echo "blacklist lbm-nouveau" | sudo tee -a /etc/modprobe.d/blacklist-nouveau.conf
sudo echo "options nouveau modeset=0" | sudo tee -a /etc/modprobe.d/blacklist-nouveau.conf
sudo echo "alias nouveau off" | sudo tee -a /etc/modprobe.d/blacklist-nouveau.conf
sudo echo "alias lbm-nouveau off" | sudo tee -a /etc/modprobe.d/blacklist-nouveau.conf
sudo touch /etc/modprobe.d/nouveau-kms.conf
sudo echo "options nouveau modeset=0" | sudo tee -a /etc/modprobe.d/nouveau-kms.conf
sudo update-initramfs -u
###Reboot the Instance
sudo reboot
####Login again
sudo apt-get install linux-headers-`uname -r`
###Do not select the option to install the outdated driver included in the following cuda package
sudo ./cuda_8.0.61_375.26_linux.run
###Update Cuda
sudo ./cuda_8.0.61.2_linux.run
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
###Install Tesla Drivers select all defaults
sudo ./NVIDIA-Linux-x86_64-390.30.run
-or-
###Install GeForce Drivers select all defaults
sudo ./NVIDIA-Linux-x86_64-390.42.run
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
###setup paths and final dependencies
sudo apt-get install gcc-5 g++-5
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 1
echo "export CUDA_PATH=/usr/local/cuda-8.0" >> ~/.bashrc
echo "export LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64" >> ~/.bashrc
echo "export PATH=$PATH:$CUDA_PATH/bin" >> ~/.bashrc
echo "export CFLAGS=-I$CUDA_PATH/include" >> ~/.bashrc
echo "export LDFLAGS=-L$CUDA_PATH/lib64" >> ~/.bashrc
source .bashrc
sudo ln -s /usr/local/cuda/lib64/libcudart.so /usr/lib/libcudart.so
sudo ln -s /usr/local/cuda/lib64/libcudart.so.8.0 /usr/lib/libcudart.so.8.0
###Test Driver framework
nvidia-smi
###Install megatools
wget https://megatools.megous.com/builds/megatools-1.9.98.tar.gz
tar -xzf megatools-1.9.98.tar.gz
cd megatools-1.9.98
./configure
make
sudo make install
###Download Enemy Miner
megadl 'https://mega.nz/#!ADxkjDKJ!h3gyL_Yc_ChGufgt1QOFE4mg01YLF3Cqv2nhhfVkN54'
unzip enemy-1.03.zip -d ./enemy
chmod +x ./enemy/ccminer
###Run Enemy
enemy/ccminer -a x16r -o stratum+tcp://(Pool):(port) -u (Wallet Address) -p c=RVN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment