Introduction we have been trying to build Theano deep learning development environment and install NVIDIA CUDAToolkit in recent days. During this period, I thought about building it on Windows, but after learning about it on the Internet, I found that it is more appropriate in the Linux environment. In the process of building this development environment, there are actually a lot of pitfalls and twists and turns. I am not planning to write about the building process, because there are indeed many good installation steps on the Internet, as well as installation tutorials on the official website. But, in view of being pitted for several days, I 'd like to record it for a long time :) during the installation of Ubunt Introduction
We have been trying to build Theano deep learning development environment and install nvidia cuda Toolkit in recent days. During this period, I thought about building it on Windows, but after learning about it on the Internet, I found that it is more appropriate in the Linux environment. In the process of building this development environment, there are actually a lot of pitfalls and twists and turns. I am not planning to write about the building process, because there are indeed many good installation steps on the Internet, as well as installation tutorials on the official website. But, in view of being pitted for several days, record it and keep a long memory :)
During this period, Ubuntu 14.04 was installed more than four times (cause: some software dependency problems cannot be solved, and it seems impossible to change the software source. However, after switching the software source to the master server today, it is normal, but my wireless network speed is slow, so after using the master server, the download speed is obviously much slower .).
I tried to install the Fedora operating system once, because I also thought about setting up the environment on this system, because part of the dependency on Ubuntu 14.04 is always ambiguous. However, due to the NIC driver problem, the network is always unable to be connected. If the network connection fails, the compiler cannot be installed, the NIC driver cannot be installed (because the driver needs to be compiled), and the platform is finally abandoned.
I tried to install CentOS once. In fact, the installation was not successful because of my independent graphics card driver problem. As a result, all the text on the graphical interface of the installation program is blurred, I couldn't even recognize the text of the "Exit installation" button and finally gave up.
Main desktop parameters
- Memory: Kingston 8 GB
- Processor: Intel Core i5-4590 CPU @ 3.3 GHz x 4
- Graphics card: NVIDIA Geforce GTX 750 (GPU Parallel Operation)
- Hard Disk: 1 TB of Western data
Install Ubuntu 14.04
- Create an Ubuntu boot disk (use a soft disk to write it to a USB flash disk );
- When the desktop is started, select Quick Start to start the Ubuntu live cd system from the USB flash disk;
- Install the Ubuntu 14.04 operating system;
- Restart the system after installation;
- Start the system and press
e
Key to go to the editing page, in the second to last line,ro quiet splash
Addnomodeset
In this way, the system will not cause a black screen due to the problem of the dedicated driver;
- After entering the system, edit the file
/boot/grub/grub.cfg
File, searchro quiet splash
Keyword, same appendnomodeset
In this way, you do not need to repeat the above steps before starting the system.
Tools required for installing Theano Environment
These tools may be used later, such as compilers.
sudo apt-get install -y python-dev python-pip python-nose gcc g++ git gfortran
Install BLAS, LAPACK, and ATLAS
These packages must be installed before Numpy and Scipy.
sudo apt-get install -y libopenblas-dev liblapack-dev libatlas-base-dev
Install NumPy
Used in official tutorialsapt-get
Installation method, but it seems that I did not pass the unit test after installation, there are many errors. This is especially true for the SciPy installed later. Maybe it has something to do with the installation of the required toolkit.
# Install NumPy. This installation process needs to wait. It takes some time to compile it. # In fact, SciPy and Theano installed later will spend time compiling, and the entire installation process will take a long time. Sudo pip install numpy # for testing. Python-c 'import numpy; numpy. test ()'
You must ensure that the test passes and then proceed to the next step to ensure that each step is correct. If there is no Errors, the test is passed. The test results are as follows.
Install SciPy
# Installation method. Please wait for compilation. :) sudo pip install scipy # test python-c 'import scipy; scipy. test ()'
Must be guaranteedscipy
In this way, you can continue to install Theano. The test result is as follows:
-------------------------------------- Split line --------------------------------------
CUDA (including GPU Card Driver) Installation Process http://www.linuxidc.com/Linux/2015-07/120456.htm under Ubuntu
Caffe + Ubuntu 14.04 64bit + CUDA 6.5 configuration instructions http://www.linuxidc.com/Linux/2015-04/116444.htm
Ubuntu 14.04 install and configure CUDA http://www.linuxidc.com/Linux/2014-10/107501.htm
Ubuntu 12.04 configuration NVIDIA CUDA5.5 real-time http://www.linuxidc.com/Linux/2014-10/107502.htm
Ubuntu installation Theano + CUDA http://www.linuxidc.com/Linux/2014-10/107503.htm
For Ubuntu 12.04 CUDA5.5 installation, see the following link Ubuntu 12.04 installation CUDA-5.5
-------------------------------------- Split line --------------------------------------
Install Theano
# Install sudo pip install Theano # start testing sudo python-c 'import theano; theano. test ()'
Okay, I feel likeTheano
The test took a long time, so please wait. The final result is as follows.
Install CUDA Toolkit download CUDA Toolkit
This nvidia cuda Toolkit has encountered many problems. The Installation process is recorded below. for detailed instructions, see the Installation Guide for Linux officially provided by NVIDIA. Note that the installation file already contains a newer NVIDIA graphics card driver, so you do not need to install the exclusive driver separately.
Download CUDA Toolkit
Go to the CUDA Toolkit Download Page
Select the Ubuntu 14.04 operating system and downloadrunfile(1.1G)
File, and record the corresponding MD5 value to verify whether the downloaded document is damaged.
Download GPU Development Kit
After the download is complete, check whether the MD5 value of the downloaded file is the same as that provided on the download page to ensure that the downloaded installation package is intact.
Install required Libraries
- The following are some libraries that may be used. Otherwise, a missing library file may be prompted during CUDA installation.
sudo apt-get install freeglut3-dev build-essential libx11-dev libxmu-dev libxi-dev libgl1-mesa-glx libglu1-mesa libglu1-mesa-dev
- It is worth noting that in my Ubuntu System
/usr/lib/x86_64-linux-gnu/
The directory namedlibGLU.so.1.3.1
./usr/lib/
Directory.
sudo ln -s /usr/lib/x86_64-linux-gnu/libGLU.so.1.3.1 /usr/lib/libGLU.so
Install CUDA
- First, close X-Window and enter the character interface (such as tty1 ). Close the X-Window method:
sudo service lightdm stop
- Next, in the character interface, download
cuda_7.5.18_linux.run
Andcuda_352_39_gdk_linux.run
Add executable permissions
- Install the Development Kit:
sudo ./cuda_352_39_gdk_linux .run
- Install CUDA:
sudo ./cuda_7.5.18_linux.run
, The installation process can proceed directly as prompted
- Restart X-Window:
sudo service lightdm start
For more details, refer to the highlights on the next page.: Http://www.linuxidc.com/Linux/2015-09/123562p2.htm