I daresay learning how to program CUDA and/or dealing with Deep Learning is gonna net you much better ROI than cryptomining.
Anyway, let's march on.
Anyway, installing of NVIDIA drivers and CUDA 8 goes as follows:
1. Add graphics-drivers PPA from https://launchpad.net/~graphics-drivers/+archive/ubuntu/ppa
$ apt-add-repository ppa:graphics-drivers/ppa
2. Get CUDA 8 runfile from https://developer.nvidia.com/cuda-downloads
$ wget https://developer.nvidia.com/compute/cuda/8.0/Prod2/local_installers/cuda_8.0.61_375.26_linux-run
3. Install NVIDIA drivers; might need to reboot
$ apt-get install nvidia-381
(Or go via “Driver Manager”)
4. Install CUDA 8 runfile, make sure to only install the CUDA toolkit. You can ignore the warnings pertaining the GL stuff if you want to use only CUDA.
$ cd /whereever/you/downloaded/cuda $ ./cuda_8.0.61_375.26_linux.run
Or, if you know what you are doing,
$ ./cuda_8.0.61_375.26_linux.run --toolkit --silent
The tail of the CUDA installer log should look like:
... =========== = Summary = =========== Driver: Not Selected Toolkit: Installed in /usr/local/cuda-8.0 Samples: Installed in /home/volker, but missing recommended libraries Please make sure that - PATH includes /usr/local/cuda-8.0/bin - LD_LIBRARY_PATH includes /usr/local/cuda-8.0/lib64, or, add /usr/local/cuda-8.0/lib64 to /etc/ld.so.conf and run ldconfig as root To uninstall the CUDA Toolkit, run the uninstall script in /usr/local/cuda-8.0/bin Please see CUDA_Installation_Guide_Linux.pdf in /usr/local/cuda-8.0/doc/pdf for detailed information on setting up CUDA. ***WARNING: Incomplete installation! This installation did not install the CUDA Driver. A driver of version at least 361.00 is required for CUDA 8.0 functionality to work. To install the driver using this installer, run the following command, replacing <CudaInstaller> with the name of this run file: sudo <CudaInstaller>.run -silent -driver Logfile is /tmp/cuda_install_30008.log
5. Observe the needed adjustments to PATH and LD_LIBRARY_PATH
6. To see if it works, compile the deviceQuery program, i.e.
$ cd /usr/local/cuda/samples/1_Utilities/ $ make $ ./deviceQuery
Should do something like this:
./deviceQuery ./deviceQuery Starting... CUDA Device Query (Runtime API) version (CUDART static linking) Detected 1 CUDA Capable device(s) Device 0: "GeForce GTX 1080 Ti" CUDA Driver Version / Runtime Version 8.0 / 8.0 CUDA Capability Major/Minor version number: 6.1 Total amount of global memory: 11171 MBytes (11713708032 bytes) (28) Multiprocessors, (128) CUDA Cores/MP: 3584 CUDA Cores GPU Max Clock rate: 1683 MHz (1.68 GHz) Memory Clock rate: 5505 Mhz Memory Bus Width: 352-bit L2 Cache Size: 2883584 bytes Maximum Texture Dimension Size (x,y,z) 1D=(131072), 2D=(131072, 65536), 3D=(16384, 16384, 16384) Maximum Layered 1D Texture Size, (num) layers 1D=(32768), 2048 layers Maximum Layered 2D Texture Size, (num) layers 2D=(32768, 32768), 2048 layers Total amount of constant memory: 65536 bytes Total amount of shared memory per block: 49152 bytes Total number of registers available per block: 65536 Warp size: 32 Maximum number of threads per multiprocessor: 2048 Maximum number of threads per block: 1024 Max dimension size of a thread block (x,y,z): (1024, 1024, 64) Max dimension size of a grid size (x,y,z): (2147483647, 65535, 65535) Maximum memory pitch: 2147483647 bytes Texture alignment: 512 bytes Concurrent copy and kernel execution: Yes with 2 copy engine(s) Run time limit on kernels: Yes Integrated GPU sharing Host Memory: No Support host page-locked memory mapping: Yes Alignment requirement for Surfaces: Yes Device has ECC support: Disabled Device supports Unified Addressing (UVA): Yes Device PCI Domain ID / Bus ID / location ID: 0 / 1 / 0 Compute Mode: < Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) > deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 8.0, CUDA Runtime Version = 8.0, NumDevs = 1, Device0 = GeForce GTX 1080 Ti Result = PASS
For crypto mining, we illustrate xmrMiner (Monero) and ethminer (Ethereum).
0. Install some deps
$ apt-get install libssl-dev cmake cmake-curses-gui libcurl4-gnutls-dev git libjansson-dev
$ git clone https://github.com/xmrMiner/xmrMiner/
2. Build (CUDA_ARCH=61 is for Compute Capability 6.1; You may need different; cf. https://developer.nvidia.com/cuda-gpus)
$ cd xmrMiner $ mkdir build $ cd build $ cmake -DCUDA_ARCH=61 .. $ make
3. Play around with the launch config.
You can use this for benchmarking
$ ./xmrMiner --launch=82x56 --benchmark
Or something like this for production use
./xmrMiner --launch=82x56 --url=stratum+tcp://pool.supportxmr.com --user=MONERO_ADDRESS --pass=WORKER_ID:email@example.com
See https://www.reddit.com/r/Monero/comments/5xciun/xmrminer_a_new_high_optimized_nvidia_gpu_miner/ for some –launch parameter hints. There are also some in the README, which you've surely read.
$ cd ethminer $ cd build $ cmake -DETHASHCL=OFF -DETHASHCUDA=ON -DCOMPUTE=61 .. $ cmake --build .
$ cd ethminer $ ./ethminer -U -M
4. Run with a random pool; make sure to adjust your address
$ ./ethminer --farm-recheck 200 -U -S eu1.ethermine.org:4444 -FS us1.ethermine.org:4444 -O 0x06f1F736c6D1d5F360A304e0B86ff6874bF18b59.m18