> 1. DO NOT install nvidia driver, install cuda toolkit + samples. > > 2. use default install path `/usr/local/cuda-9.2` > > 3. use `/usr/local/cuda-9.2/bin/uninstall_cuda_9.2.pl` to uninstall
```bash chmod +x ./cuda_9.2.148_396.37_linux.run
# Using unspported compiler---> override ./cuda_9.2.148_396.37_linux.run --override
output
---------------------------------------
Do you accept the previously read EULA?
(accept/decline/quit): accept
Install NVIDIA Accelerated Graphics Driver for Linux-x86_64 396.37? (y)es/(n)o/(q)uit: no
Install the CUDA 9.2 Toolkit?
(y)es/(n)o/(q)uit: yes
Enter Toolkit Location
[ default is /usr/local/cuda-9.2 ]:
Do you want to install a symbolic link at /usr/local/cuda? (y)es/(n)o/(q)uit: yes
Install the CUDA 9.2 Samples?
(y)es/(n)o/(q)uit: yes
Enter CUDA Samples Location
[ default is /home/kezunlin ]:
Installing the CUDA Toolkit in /usr/local/cuda-9.2 ...
Installing the CUDA Samples in /home/kezunlin ...
===========
= Summary =
===========
Driver: Not Selected
Toolkit: Installed in /usr/local/cuda-9.2
Samples: Installed in /home/kezunlin
Please make sure that
- PATH includes /usr/local/cuda-9.2/bin
- LD_LIBRARY_PATH includes /usr/local/cuda-9.2/lib64, or, add /usr/local/cuda-9.2/lib64 to /etc/ld.so.conf and run ldconfig as root
To uninstall the CUDA Toolkit, run the uninstall script in /usr/local/cuda-9.2/bin
Please see CUDA_Installation_Guide_Linux.pdf in /usr/local/cuda-9.2/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 384.00 is required for CUDA 9.2 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_6659.log
reboot to enter GUI
1
sudo reboot
OK. we no longer have Loop Login Problem.
add library path
system env
1 2 3 4 5 6 7
vim .bashrc
# for cuda and cudnn export PATH=/usr/local/cuda/bin:$PATH export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
source .bashrc
or by conf file
1 2 3 4
sudo vim /etc/ld.so.conf.d/cuda.conf /usr/local/cuda/lib64
CUDA Device Query (Runtime API) version (CUDART static linking)
Detected 1 CUDA Capable device(s)
Device 0: "GeForce GTX 1060" CUDA Driver Version / Runtime Version 9.2 / 9.2 CUDA Capability Major/Minor version number: 6.1 Total amount of global memory: 6078 MBytes (6373572608 bytes) (10) Multiprocessors, (128) CUDA Cores/MP: 1280 CUDA Cores GPU Max Clock rate: 1733 MHz (1.73 GHz) Memory Clock rate: 4004 Mhz Memory Bus Width: 192-bit L2 Cache Size: 1572864 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 supports Compute Preemption: Yes Supports Cooperative Kernel Launch: Yes Supports MultiDevice Co-op Kernel Launch: 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 = 9.2, CUDA Runtime Version = 9.2, NumDevs = 1 Result = PASS
we get Result = PASS.
install cudnn
download cudnn-9.2-linux-x64-v7.1.tgz for ubuntu 16.04
copy include to /usr/local/cuda-9.2/include
copy lib64 to /usr/local/cuda-9.2/lib64
commands
1 2 3
tar -xzvf cudnn-9.2-linux-x64-v7.1.tgz sudocp cuda/include/cudnn.h /usr/local/cuda/include/ sudocp cuda/lib64/* /usr/local/cuda/lib64/