Ubuntu 仅检测到旧版本的 cuda

Ubuntu 仅检测到旧版本的 cuda

我目前正在使用大学 GPU,但我没有 root 权限。有人告诉我要向我的.bashrc文件添加一个目录,以便我可以使用cuda 8cudnn 6。我在安装 theano-gpu 环境时已经这样做了。但是,现在当我运行which nvcc或检查安装了哪个版本的cuda或时,我得到的是7.5 版和一个更旧的版本(我假设一个更旧的版本,因为输出了,但我不确定它是否显示)。cudnncudacudnncudnncheck libcudnncudnn 6

终端输出:

raviteja@puck:~$ which nvcc
/usr/local/cuda/bin/nvcc

raviteja@puck:~$ check libcudnn 
    libcudnn.so.4 -> libcudnn.so.4.0.7
    libcudnn.so.5 -> libcudnn.so.5.1.3
libcudnn is installed

raviteja@puck:~$ echo $PATH
/home/mixqui/raviteja/virtenvs/homography/bin:/usr/local/cuda-8.0:/usr/local/cuda-8.0:/usr/local/cuda-8.0/lib64:/usr/local/cudnn6.0/lib64:/usr/local/cudnn5.1/lib64:/usr/local/cudnn4.0/lib64:/usr/local/cuda/lib64::/usr/local/cudnn6.0/include::/usr/local/cudnn6.0/lib64:/home/mixqui/raviteja/opencv/lib:/bin:/home/mixqui/raviteja/IDE/pycharm-community-2016.3.2/bin:/home/mixqui/raviteja/opencv:/home/mixqui/raviteja/anaconda/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

为什么cuda 8cudnn 6没有被检测到,即使它们位于我的环境变量的开头$PATH?我该如何解决这个问题?

编辑:

尝试以下答案后,我的.bashrc 文件如下:

#where to store the virtual envs
export WORKON_HOME=$HOME/virtenvs
#where the projects will reside
export PROJECT_HOME=$HOME/Projects-Active
#where is the virtualenvwrapper.sh
source /usr/local/bin/virtualenvwrapper.sh

# set PATH for cuda 8.0 installation
if [ -d "/usr/local/cuda-8.0/bin/" ]; then
    export PATH=/usr/local/cuda-8.0/bin${PATH:+:${PATH}}
    export LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
fi

export PATH=/home/mixqui/raviteja/opencv:~/anaconda/bin:$PATH

export THEANO_FLAGS='cuda.root=/usr/local/cuda-8.0,device=cuda0,floatX=float32'
export CUDA_ROOT='/usr/local/cuda-8.0'
export CUDA_HOME='/usr/local/cuda-8.0'
export LD_LIBRARY_PATH=/usr/local/cudnn6.0/lib64:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64:$LD_LIBRARY_PATH
export CPATH=/usr/local/cudnn6.0/include:$CPATH
export LIBRARY_PATH=/usr/local/cudnn6.0/lib64:/home/mixqui/raviteja/opencv/lib:$LIBRARY_PATH
export PATH=~/IDE/pycharm-community-2016.3.2/bin:$PATH
export PATH=${CUDA_HOME}:${CUDA_ROOT}:${LD_LIBRARY_PATH}:${CPATH}:${LIBRARY_PATH}/bin:${PATH}

export CPATH=~/.local/include:/usr/local/lib:$CPATH
export LIBRARY_PATH=~/.local/lib:/usr/local/lib:$LIBRARY_PATH
export LD_LIBRARY_PATH=/usr/local/lib:~/.local/lib:/home/mixqui/raviteja/opencv/lib:$LD_LIBRARY_PATH
export PKG_CONFIG_PATH=/home/mixqui/raviteja/opencv/lib/pkgconfig/:$PKG_CONFIG_PATH

但是,即使在我执行之后source .bashrc,的输出nvcc --version也没有改变:

raviteja@puck:~$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2015 NVIDIA Corporation
Built on Tue_Aug_11_14:27:32_CDT_2015
Cuda compilation tools, release 7.5, V7.5.17

相关内容