Install cuda, pyrit-cuda, and optimus on KaliLinux

Source: Internet
Author: User
I won't talk about the installation of cuda and optimus on the theme. I found that some foreigners did not succeed or there were few articles about Kali. after more than one day of repeated installation and testing, this article is the final one, the English version is also released. Installing cuda and nvidia drivers is relatively simple. before installation, we recommend that you... I won't talk about the installation of cuda and optimus on the theme. I found that some foreigners did not succeed or there were few articles about Kali. after more than one day of repeated installation and testing, this article is the final one, the English version is also released.
Install Cuda And Nvidia Driver
This step is relatively simple. before installation, we recommend that you edit the/etc/apt/source. list file, comment out the foreign source and switch it to the Chinese Emy of science and technology, and download it quickly. The address of Ke Dayuan is as follows:
Deb http://mirrors.ustc.edu.cn/kali kali main non-free contrib
Deb-src http://mirrors.ustc.edu.cn/kali kali main non-free contrib
 
Deb http://mirrors.ustc.edu.cn/kali-security kali/updates main contrib non-free
Run the following command to install
Apt-get update
 
 
Apt-get install nvidia-detect nvidia-libopencl1 nvidia-opencl-common nvidia-support nvidia-opencl-icd nvidia-visual-profiler nvidia-glx nvidia-installer-cleanup nvidia-kernel-common nvidia -smi nvidia-alternative nvidia-opencl-dev libglx-nvidia-alternatives nvidia-kernel-dkms nvidia-cuda-toolkit nvidia-vdpau-driver nvidia-xconfig glx-alternative-nvidia libgl1-nvidia-alternatives nvidia -settings libgl1-nvidia-glx xserver-xorg-video-nvidia unzip libcudart4 libcufft4 libnpp4 libnvidia-compiler libcuda1 runtime libnvidia-ml1 unzip libcusparse4 libcurand4 python-pycuda-doc python-pycuda-headers python-pycuda nvidia-cuda- doc nvidia-cuda-gdb
Because many packages may be a little slow, the installation process will pop up two windows to confirm, just OK. after the execution, the toolkit and driver are installed, and then some variables are written to the system, in/root /. add the following paragraph to the end of bashrc:
PATH = $ PATH:/usr/lib/nvidia-cuda-toolkit/bin
LD_LIBRARY_PATH = $ LD_LIBRARY_PATH:/usr/lib/nvidia-cuda-toolkit/lib:/lib
 
Export PATH
Export LD_LIBRARY_PATH
You can execute ldconfig to take effect immediately, but it will be restarted once.
Install Pyrit-cuda
Next, recompile a pyrit to try GPU. The download address of pyrit is:
Https://code.google.com/p/pyrit/downloads/list
Download pyrit-0.4.0.tar.gzand cpyrit-cuda-0.4.0.tar.gz. after the download, install the required tool.
Atp-get install libpcap-dev python2.7-dev
Decompress pyrit-0.4.0.tar.gz and install
Tar-xzvf pyrit-0.4.0.tar.gz
Cd pyrit-0.4.0
 
Python setup. py build
Python setup. py install
Decompress cpyrit-cuda-0.4.0.tar.gz
Tar-xzvf cpyrit-cuda-0.4.0.tar.gz
Cd cpyrit-cuda-0.4.0
Here we need to make some changes, edit setup. py, and set the 35th rows
For path in ('/usr/local/cuda', '/opt/cuda '):
Change
For path in ('/usr/local/cuda', '/usr/lib/nvidia-cuda-toolkit', '/opt/cuda '):
Otherwise the installation program cannot find nvcc
Then install
Python setup. py build
Python setup. py install
After installation, run
Pyrit list_cores
We should be able to see the GPU.
#1: 'Cuda-Device #1 'geforce 8400 gs''
#2: 'CPU-Core (SSE2 )'
 
#3: 'CPU-Core (SSE2 )'
#4: 'CPU-Core (SSE2 )'
 
#5: 'CPU-Core (SSE2 )'
#6: 'CPU-Core (SSE2 )'
 
#7: 'CPU-Core (SSE2 )'
#8: 'CPU-Core (SSE2 )'
Install Optimus
Retrieve the source Key
Wget-O-http://suwako.nomanga.net/suwako.asc | apt-key add-
Add the Bumblebee source to/etc/apt/source. list.
Deb http://suwako.nomanga.net/debian sid main contrib
Deb-src http://suwako.nomanga.net/debian sid main
Then execute the installation
Apt-get update
Apt-get install bumblebee-nvidia
After installation, add root to the bemblebe group and restart
Adduser root bumblebee
After restart, you can test and run them separately.
Glxspheres
Optirun glxspheres
The number of frames is different.
 
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.