Ubuntu non-root user install Theano configure GPU

Source: Internet
Author: User
Tags theano

          • Installing Theano
          • Configuring the GPU

"Original" Liu_longpo
Reprint Please specify the source "CSDN" http://blog.csdn.net/llp1992

Installing Theano

This post is an experience and I hope to help those who have struggled with me.

Already said, non-root users, so can not use sudo, only this series of trouble.

To install Theano, you need some dependencies, and you can refer to the blog for details:

Deeplearning (i) Best environment collocation and entry information

If there is no root authority, the source of the installation of this large pile of things is quite troublesome.
Fortunately, there is such a tool called Anaconda, it has built up a lot of Python library, after installing the Anaconda only need to install Theano can

Anaconda Download Link

Select the corresponding system version, for example I am: anaconda-2.3.0-linux-x86_64.sh

After downloading, install with sh command. Typically installed by default in the home directory, next we will install Theano, similarly, according to this blog post:

Deeplearning (i) Best environment collocation and entry information

Provide the Theano source code, download link, download after the decompression. We installed using Anaconda python instead of system Python and now add Anaconda python to the environment variable:

export PATH="/home/.../anaconda/bin:$PATH"

Then enter the extracted Theano directory and run

python setup.py install

The Theano and other plugins are now installed.

At the same time, the Anaconda Python IDE, the Spyder is also very handy.

Configuring the GPU

Here the default has been installed Cuda,cuda the installation of many online tutorials, but also a variety of, because the server has been installed Cuda, the installation process I have omitted.

When configuring the GPU, the online tutorials are said to be configured in the. theanorc file, and I began to wonder that the home directory did not seem to have this thing, and later found out that in fact it is possible to create a. theanorc file.

First we go to the root directory:

cd ~

And then

vim .theanorc   #   如果不存在该文件则会建立

Then add the following configuration in. Theanorc:


Save to exit.

At the same time, we should add the Cuda path to the environment variable, otherwise it will be reported: Cannot find the NVCC compiler error. You can write script files spyder.sh as follows:

export PATH="/home/.../anaconda/bin:$PATH"export PATH="/usr/local/cuda/bin:$PATH"spyder

Then we enter in the root directory:

sh spyder.sh

You can open the Spyder.

How fast can GPU speed be configured?


33600 photos of 28x28, in the local computer iteration to run 60 seconds or so, on the server only 2 seconds, of course, the server CPU and memory also played a big role.

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Ubuntu non-root user install Theano configure GPU

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.