Description
- This tutorial is installed on the desktop with only one NVIDIA video card. The operating system is Ubuntu 14.04.
- Dual graphics Notebook please go to ubuntu-install-cuda7.0-dual graphics card
Prepare for Updates
sudo apt-get update
- Let's say the downloaded files are under ~/dowloads/.
Download Cuda 7.0
- If this version is not, you can search, as shown;
- Click on "Linux x86" to select the Last "RUN" download of the "Ubuntu 14.04" line;
Download NVIDIA graphics drivers
- Select the configuration for your computer and click "Search";
- Click "Dowload" to download;
Verify the system verifies that the video card supports CUDA
- Terminal Input command,. If only one message is returned, that is, there is only one video card, you can continue to the following tutorial, otherwise please step "ubuntu-install-cuda7.0-dual graphics card"
| grep VGA
- The terminal will display the graphics card model, look in the Https://developer.nvidia.com/cuda-gpus, whether there is your graphics card model, as long as there is, the video card support Cuda, but also can see the graphics card computing power, the larger the better.
View System Type
- Command line enter the following command;
uname -m && cat /etc/*release
- The first line shows a x86_64, indicating that the system is a x86 frame 64-bit system;
Installing NVIDIA Graphics Drivers
- Description: The previously downloaded Cuda7.0*.run contains NVIDIA graphics drivers and is prompted to install drivers when installed. However, since the installation of the driver Nouveau in Ubuntu is already a bit Nvidia graphics card, and the driver is running, so the process of installing the driver is a little cumbersome, it is recommended to install the video driver separately, and then install Cuda
Switch to Tty1
- Description, Windows will use the video card, if the original driver nouveau in the window will not stop, it will not be installed successfully
- Press the key combination "CTRL+ALT+F1" and switch to TTY;
Close the monitor Manager
- Enter
sudo stop lightdm the command to close the monitor manager. Otherwise the old graphics card driver cannot be disabled and the new graphics driver cannot be installed.
Disable Legacy Graphics drivers
- Note:
禁用旧的显卡驱动 This step can be done without action, the issue will be prompted when the new Nvidia graphics driver is installed later, and the appropriate option is then selected to create the file ...
- Disable the old graphics driver, switch to/etc/modprobe.d/, new file nvidia-installer-disable-nouveau.conf, enter
blacklist nouveauoptions nouveau modeset=0
- At the end of the file/etc/default/grub, add a line, as shown below;
blacklist nouveau
Install a new driver
- Execute the following command to install
# 切换到驱动所在的路径cd ~/Downloads# 查看驱动的名称(ls)ls# 开始安装,注意将驱动名换成你下载的驱动的名称sudo sh ./NVIDIA-Linux-x86_64-352.30.run
- During installation, depending on the prompt, select
accept , ' Yes ' or the default option
- Option: Accept→continue→installation→ok→ok→ok
- Reboot continues when the prompt restarts.
- After rebooting, switch to TTY (CTRL+ALT+F1), turn off monitor management (
sudo stop lightdm ), rerun the install driver command sudo sh ./NVIDIA-Linux-x86_64-352.30.run
- When prompted *would you run Nvidia-xconfig utility ... , select Yes.
Verify that the driver is installed successfully
- Open terminal and enter the following command:
cat /proc/driver/nvidia/version
- If the driver version is displayed, the installation is successful. As shown in.
Cuda Installation
- Note that you should continue to install Cuda if the video driver is successfully installed, otherwise the installation will fail.
Installing dependent libraries
sudo apt-get install freeglut3-devsudo apt-get install build-essentialsudo apt-get install libx11-devsudo apt-get install libxmu-dev sudo apt-get install libxi-dev sudo apt-get install libglu1-mesa sudo apt-get install libglu1-mesa-dev
To run the CUDA installation command
# 注意,将cuda名称换成自己下载的名称sudo ./cuda_7.0.28_linux.run
- During installation, you will be prompted to install the nvidia driver , Opengl,cuda installation package and sample package. Only the following three are installed here. Since the latest version of Nvidia driver is already installed in the front, no installation is necessary here.
- During the installation process, according to the prompts, select Accept, ' Yes ' or the default option;
- ... symbolic link ... Option Select Yes, otherwise no
/usr/local/cuda/ , only/usr/local/cuda7.0/
- After the installation is complete, start monitor management (
sudo start lightdm ) and switch back to the Windows interface.
Configuring Environment variables
- Open the terminal and add the following at the end of the file/etc/profile:
PATH=/usr/local/cuda/bin:$PATHPATH
- Once saved, execute the following command to make the environment variable effective immediately
source /etc/profile
- Create a new file cuda.conf in/etc/ld.so.conf.d/and add the following:
/usr/local/cuda/lib64
- Execute the following command to make it effective immediately:
sudo ldconfig
Verify that the environment is set.
- Open terminal, enter
cuda , press 2 times "tab", if there is a popup command prompt, it indicates the environment configuration is successful.
Installing Cuda SAMPLES
- Cuda Samples is installed by default and stored in the current user directory (/home/xuezhisd/nvidia_cuda-7.0_samples), as shown in the Cuda process.
Verify NVCC
- Enter
nvcc --version a command that displays the version number if it is already installed, and if it is not installed, follow the prompts to complete the installation.
Verify NVCC
#切换到cuda-samples所在目录#注意,换成自己的路径cd /home/xuezhisd/NVIDIA_CUDA-7.0_Samples#编译 make (安装命令 sudo apt-get install cmake)make#编译完毕,切换release目录cd ./bin/x86_64/linux/release#检验是否成功#运行实例 ./deviceQuery./deviceQuery
- Displays the following results, indicating success.
Installing CUDNN Reference Articles
Ubuntu 13.04 Dual Graphics installation nvidia GT 630M Drive
Caffe + Ubuntu 14.04 64bit + CUDA 6.5 configuration instructions
Ubuntu14.04+cuda6.5+opencv2.4.9+matlab2013a+caffe configuration record (ii)
Error:module Nouveau is in use
How-to:unload nouveau and Install Nvidia Driver
Caffe installation in Ubuntu 14.04 64bit
Ubutu14.04lts+opencv2.4.9+matlab 2014A+CAFFE+CUDNN
Optimus Dual graphics with Bumblebee3.0 under ubuntu12.04 configuration CUDA4.2
Ubuntu 14.04 nvidia graphics driver installation and setup
Ubuntu 11.10 Drive GTX 460 graphics card disabled Nouveau
ERROR
sudo apt-get purge nvidia-304
sudo apt-get install nvidia-331
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
ubuntu-installing-cuda7.0-supports-ultra-detailed tutorial