#!/bin/bash | |
### Command log to install Cuda Toolkit 6.5, driver 343.22, and ccminer. | |
## Update the system | |
sudo apt-get update && sudo apt-get -y dist-upgrade | |
# All the dependencies for Cuda & ccminer (I think) | |
sudo apt-get -y install gcc g++ build-essential automake linux-headers-$(uname -r) git gawk libcurl4-openssl-dev libjansson-dev xorg libc++-dev libgmp-dev python-dev | |
## Install the nvidia display driver | |
cd && wget http://us.download.nvidia.com/XFree86/Linux-x86_64/352.41/NVIDIA-Linux-x86_64-352.41.run | |
sudo chmod +x NVIDIA-Linux-x86_64-352.41.run | |
sudo ./NVIDIA-Linux-x86_64-352.41.run --accept-license --no-questions --disable-nouveau --no-install-compat32-libs | |
rm NVIDIA-Linux-x86_64-352.41.run | |
sudo echo 'GRUB_CMDLINE_LINUX="nomodeset"' >> /etc/default/grub | |
sudo update-grub | |
sudo nvidia-xconfig -a --cool-bits=28 --allow-empty-initial-configuration # flags enable OC and fan controls. via: https://bitcointalk.org/index.php?topic=826901.msg12279696#msg12279696 | |
## Time to install cuda! | |
cd && wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/cuda-repo-ubuntu1404_6.5-14_amd64.deb | |
sudo dpkg -i cuda-repo-ubuntu1404_6.5-14_amd64.deb | |
rm cuda-repo-ubuntu1404_6.5-14_amd64.deb | |
sudo apt-get update | |
sudo apt-get -y install cuda-toolkit-6-5 # You're gonna have to accept the terms here. Not an unattended install! | |
# OPTIONAL: Install the 'cuda' package. It includes some more things. | |
sudo usermod -a -G video $USER | |
echo "" >> ~/.bashrc | |
echo "export PATH=/usr/local/cuda-6.5/bin:$PATH" >> ~/.bashrc | |
echo "export LD_LIBRARY_PATH=/usr/local/cuda-6.5/lib64:$LD_LIBRARY_PATH" >> ~/.bashrc | |
## You should probably restart the system here | |
sudo shutdown -r now | |
## Lets make the deviceQuery sample. This is used to verify cuda works | |
cd /usr/local/cuda/samples/1_Utilities/deviceQuery && sudo make | |
# If you see all of your cards listed, and the last line says "Result = PASS" you're good to go! | |
/usr/local/cuda/samples/1_Utilities/deviceQuery/deviceQuery | |
## djm34's fork requires this, and there aren't any packages available in the repos. | |
cd && wget http://www.mpir.org/mpir-2.6.0.tar.bz2 | |
tar jxf mpir-2.6.0.tar.bz2 | |
rm mpir-2.6.0.tar.bz2 | |
cd mpir-2.6.0/ | |
./configure | |
make && make check | |
sudo make install | |
cd && rm -r mpir-2.6.0/ | |
echo "export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH" >> ~/.bashrc | |
## ccminer, djm34 fork. commit: 3cd198a461618eb3807fe608475f2034ef76bd53 as of this writing. | |
cd && git clone https://github.com/djm34/ccminer.git | |
cd ccminer/ | |
./autogen.sh | |
./configure | |
make | |
### Thought this was useful? btc:14ciL7BuCyLy1LJcqhzQnpEQUGjinGU5TD |
This comment has been minimized.
This comment has been minimized.
Could you add a crypto hash for NVIDIA-Linux-x86_64-352.41.run? I got a SHA-256 of |
This comment has been minimized.
This comment has been minimized.
For Ubuntu 15 I have found the following: Notes on installing and compiling ccminer on Ubuntu 15.. Wrong versions of GCC and G++:
1b. in terminal/console write: sudo ln -s /usr/bin/gcc-47 /usr/local/cuda/gcc
|
This comment has been minimized.
This comment has been minimized.
Sorry if these comments are spamming but after fixing the above I got to compile but I got a new error that sent me to this page: http://www.cs.virginia.edu/~mwb7w/cuda_support/libcudart.html |
This comment has been minimized.
This comment has been minimized.
The above helped but I had to set the path to /lib64 not /lib in the first command (1): (from the page) (export LD_LIBRARY_PATH=$LD_LIBARY_PATH:/usr/local/cuda/lib64) ........... Problem: When executing a CUDA program under Linux, you get the following error: error while loading shared libraries: libcudart.so.2: cannot open shared object file: No such file or directory Solution: You need to add the path to the CUDA libraries to your $LD_LIBRARY_PATH environment variable. Explanation: There are two solutions (these assume you are using the bash shell, which is the default CS Department shell):
|
This comment has been minimized.
This comment has been minimized.
For Elementary Loki, Ubuntu 16.04 you need to install gcc-multilib otherwise it won't understand 64bit building 32bit. |
This comment has been minimized.
I was wondering if CUDA 7 would also work and why use this fork and not cbuchner1's.