蟒蛇在哪里安装cudatoolkit和cudnn?

时间:2020-04-09 14:01:50

标签: cuda conda nvidia cudnn

我习惯从Nvidia来源安装Cuda工具包和cudnn,但是我刚刚尝试通过conda使用以下内容进行安装:

conda install cudatoolkit=10.0
conda install -c anaconda cudnn

我现在正在尝试使用cuda支持来编译FAISS,这要求我在编译时将路径传递给cuda安装。

有人知道Anaconda在哪里安装cuda工具包吗?我还想找到anaconda在哪里安装cudnn,以防将来变得很重要。其他人可以提供的有关此问题的任何帮助将大有帮助!

操作系统:Ubuntu 18.04

首先,我尝试使用以下命令搜索cuda工具包:

nvcc --version

但这返回了:

Cuda compilation tools, release 9.1, V9.1.85

9.1版,而不是10.0版!因此,我尝试了:

locate cuda | grep /cuda$

这返回了几件事:

(3.6) user$ locate cuda | grep /cuda$
/home/dhlab/anaconda3/envs/3.6/include/boost/fiber/cuda
/home/dhlab/anaconda3/envs/3.6/lib/python3.6/site-packages/cupy/cuda
/home/dhlab/anaconda3/envs/3.6/lib/python3.6/site-packages/numba/cuda
/home/dhlab/anaconda3/envs/pixplot/lib/python3.6/site-packages/numba/cuda
/home/dhlab/anaconda3/envs/pixplot/lib/python3.6/site-packages/tensorflow_core/include/external/local_config_cuda/cuda
/home/dhlab/anaconda3/envs/pixplot/lib/python3.6/site-packages/tensorflow_core/include/external/local_config_cuda/cuda/cuda
/home/dhlab/anaconda3/envs/pixplot/lib/python3.6/site-packages/tensorflow_core/include/tensorflow/stream_executor/cuda
/home/dhlab/anaconda3/envs/stylegan/lib/python3.6/site-packages/tensorflow_core/include/external/local_config_cuda/cuda
/home/dhlab/anaconda3/envs/stylegan/lib/python3.6/site-packages/tensorflow_core/include/external/local_config_cuda/cuda/cuda
/home/dhlab/anaconda3/envs/stylegan/lib/python3.6/site-packages/tensorflow_core/include/tensorflow/stream_executor/cuda
/home/dhlab/anaconda3/lib/python3.7/site-packages/numba/cuda
/home/dhlab/anaconda3/pkgs/boost-cpp-1.70.0-h8e57a91_2/include/boost/fiber/cuda
/home/dhlab/anaconda3/pkgs/cupy-7.3.0-py36h273e724_0/lib/python3.6/site-packages/cupy/cuda
/home/dhlab/anaconda3/pkgs/numba-0.45.1-py37h962f231_0/lib/python3.7/site-packages/numba/cuda
/home/dhlab/anaconda3/pkgs/numba-0.49.0rc1-np1.11py3.6h04863e7_gdc1c08865_0/lib/python3.6/site-packages/numba/cuda
/usr/include/thrust/system/cuda
/usr/lib/cuda

我以为/usr/lib/cuda看起来很吸引人,所以我看了看其中的内容,但它是空的!然后我认为local_config_cuda中的tensorflow_core可能有一个线索,所以我看了一下,在那里发现了一个包含以下内容的头文件:

#define TF_CUDA_VERSION "10.0"
#define TF_CUDA_LIB_VERSION "10.0"
#define TF_CUDNN_VERSION "7"

#define TF_CUDA_TOOLKIT_PATH "/usr/local/cuda"

这听起来像我随conda一起安装的cuda工具包的版本,但是/ usr / local / cuda不存在!

我显然错过了一些东西。如果有更多使用Conda安装的Cuda经验的人可以帮助我找到Cuda工具包,以便我告诉FAISS在哪里找到它,我将不胜感激。

0 个答案:

没有答案