简体   繁体   English

Theano Ubuntu 12 CUDA

[英]Theano Ubuntu 12 cuda

my question is the next one: 我的问题是下一个:

I use theano on ubuntu 14 and configure theano flags by editing .theanorc . 我在ubuntu 14上使用theano并通过编辑.theanorc配置theano标志。 To use cuda, I only have to add: 要使用cuda,我只需添加:

[cuda]
root=/usr/local/cudaVersion/

And everything goes, theano is capable of finding nvcc, the libs and everything, I do not have to add cudaRoot to the $PATH or the library directory to $LD_LIBRARY_PATH . 一切顺利,theano能够找到nvcc,libs和所有内容,我不必将cudaRoot添加到$ PATH或将库目录添加到$LD_LIBRARY_PATH

In ubuntu 12 this does not happens. ubuntu 12中不会发生这种情况。 If I create the .theanorc in the same way, theano is only capable of finding nvcc but not the library, and I have to add /usr/local/cudaVersion/lib64 to the LD_LIBRARY_PATH enviroment variable. 如果以相同方式创建.theanorc ,theano仅能找到nvcc,而不能找到库,并且必须将/usr/local/cudaVersion/lib64LD_LIBRARY_PATH环境变量中。

The problem is that I do not like to use this enviroment variable. 问题是我不喜欢使用此环境变量。 Does anyone knows why in ubuntu 14 only editing .theanorc is enough and in ubuntu 12 is not? 有谁知道为什么在ubuntu 14中仅编辑.theanorc就足够了,而在ubuntu 12中则不够?

I will try to help you the best i can. 我会尽力为您服务。 I use Theano and CUDA on Linux. 我在Linux上使用Theano和CUDA。

First, are you sudo in both OS's ? 首先,您在两个操作系统中都使用sudo吗? Did you install theano and python environment and cuda as sudo? 您是否将theano和python环境以及cuda安装为sudo? Because, i suppose that, if the setup of CUDA wasnt done on global library path, then it wont be automatically detected. 因为,我想,如果未在全局库路径上完成CUDA的设置,则不会自动检测到它。

Also, according to the official website of theano: 另外,根据theano的官方网站:

http://deeplearning.net/software/theano/install_ubuntu.html#install-ubuntu http://deeplearning.net/software/theano/install_ubuntu.html#install-ubuntu

Quoting : 报价:

For Ubuntu 11.10 through 14.04: 对于Ubuntu 11.10至14.04:

sudo apt-get install python-numpy python-scipy python-dev python-pip python-nose g++ libopenblas-dev git sudo pip install Theano sudo apt-get install python-numpy python-scipy python-dev python-pip python-nose g ++ libopenblas-dev git sudo pip安装Theano

On 14.04, this will install Python 2 by default. 在14.04,默认情况下将安装Python 2。 If you want to use Python 3: 如果要使用Python 3:

sudo apt-get install python3-numpy python3-scipy python3-dev python3-pip python3-nose g++ libopenblas-dev git sudo pip install Theano sudo apt-get安装python3-numpy python3-scipy python3-dev python3-pip python3-nose g ++ libopenblas-dev git sudo pip install Theano

For Ubuntu 11.04: 对于Ubuntu 11.04:

sudo apt-get install python-numpy python-scipy python-dev python-pip python-nose g++ git libatlas3gf-base libatlas-dev sudo pip install Theano sudo apt-get install python-numpy python-scipy python-dev python-pip python-nose g ++ git libatlas3gf-base libatlas-dev sudo pip安装Theano

So did you follow these instructions? 那你遵循这些指示了吗? They might be the cause. 它们可能是原因。

Also, There is additional instructions to setting up cuda for theano, on the same page: 另外,在同一页面上还有其他有关为theano设置cuda的说明:

Ubuntu 11.10/12.04 (probably work on 11.04 too): Ubuntu 11.10 / 12.04(可能也适用于11.04):

sudo apt-add-repository ppa:ubuntu-x-swat/x-updates sudo apt-get update sudo apt-get install nvidia-current sudo apt-add-repository ppa:ubuntu-x-swat / x-updates sudo apt-get更新sudo apt-get安装nvidia-current

Ubuntu 14.04: Ubuntu 14.04:

sudo apt-get install nvidia-current sudo apt-get install nvidia-cuda-toolkit sudo apt-get install nvidia-当前sudo apt-get install nvidia-cuda-toolkit

The questions below might also help if the above didnt solve it. 如果以上问题未能解决,以下问题也可能会有所帮助。

As described on the references, did you edit .bashrc properly? 如参考文献所述,您是否正确编辑了.bashrc?

How did you install CUDA on both OS's? 您是如何在两个操作系统上安装CUDA的?

Did you try to uninstall CUDA,Theano and python environments and install them again? 您是否尝试卸载CUDA,Theano和python环境并重新安装?

Its probably worth to edit the question with more info if these didnt help! 如果这些没有帮助,可能值得用更多信息来编辑问题!

Extra references: 额外参考:

https://groups.google.com/forum/#!topic/theano-users/RRqYTf42YIo https://groups.google.com/forum/#!topic/theano-users/RRqYTf42YIo

http://dhaneshr.net/2015/09/10/setting-up-cudnn-and-theano-on-ubuntu-14-04-and-15-10/ http://dhaneshr.net/2015/09/10/setting-up-cudnn-and-theano-on-ubuntu-14-04-and-15-10/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM