[英]Use CUDA in virtualenv to serve Theano
Lacking root permissions I installed Theano and Lasagne in a python3 virtualenv at Ubuntu 14.04. 缺乏root权限我在Ubuntu 14.04的python3 virtualenv中安装了Theano和Lasagne。
Running some code, I get an ImportError: dnn not available
, which as far as I see results from missing CUDA header, although it is installed at /usr/local/cuda-6.5/targets/x86_64-linux/include/cudnn.h
. 运行一些代码,我得到一个
ImportError: dnn not available
,虽然它安装在/usr/local/cuda-6.5/targets/x86_64-linux/include/cudnn.h
,但我看到丢失的CUDA头的结果。 。
Following the theano documentation I set environment variable CUDA_ROOT=/usr/local/cuda-6.5
, which yields an additional error: 在theano文档之后,我设置了环境变量
CUDA_ROOT=/usr/local/cuda-6.5
,这会产生一个额外的错误:
ERROR (theano.sandbox.cuda): Failed to compile cuda_ndarray.cu: libcublas.so.6.5: cannot open shared object file: No such file or directory
Is there any way to include this CUDA library into the virtualenv? 有没有办法将这个CUDA库包含在virtualenv中?
Finally found the answer. 终于找到了答案。 In addition to environment variables I forgot to configure the
.theanorc
in my home directory like the theano documentation suggested: 除了环境变量,我忘了在我的主目录中配置
.theanorc
,如theano文档建议:
$ cat /home/user/.theanorc
[global]
floatX = float32
device = gpu0
[cuda]
root = /usr/local/cuda-6.5
Thanks anyway! 不管怎么说,还是要谢谢你! Learned the lesson to read docs carefully ...
学到了很多东西,仔细阅读文档......
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.