如何针对 Tensorflow 1.14 配置修复 "Could not find any libcudnn.7*.dylib in any subdirectory:"
How to fix "Could not find any libcudnn.7*.dylib in any subdirectory:" with respect to Tensorflow 1.14 Configuration
我目前正在配置安装了 CUDA 10.0 和 cudnn 7.5 的 tensorflow 1.14,以构建我的 Deepspeech 二进制文件。
终端代码找不到文件错误:
1) Could not find any libcudnn.7*.dylib in any subdirectory:
''
'lib64'
'lib'
'lib/*-linux-gnu'
'lib/x64'
'extras/CUPTI/*'
of:
'/usr'
'/usr/local/cuda'
Asking for detailed CUDA configuration...
2) Please specify the comma-separated list of base paths to look for CUDA libraries and headers. [Leave empty to use the default]:
我已经将文件从cudnn复制到cuda目录,如下所示:
我先解压文件,然后复制到cuda文件中
(deepspeech-venv) Chabanis-MacBook-Pro:tensorflow chabani$ tar -xzvf cudnn-10.0-osx-x64-v7.5.0.56.tgz
x cuda/include/cudnn.h
x cuda/NVIDIA_SLA_cuDNN_Support.txt
x cuda/lib/libcudnn.7.dylib
x cuda/lib/libcudnn.dylib
x cuda/lib/libcudnn_static.a
(deepspeech-venv) Chabanis-MacBook-Pro:tensorflow chabani$ sudo cp cuda/include/cudnn.h /usr/local/cuda/include
Password:
(deepspeech-venv) Chabanis-MacBook-Pro:tensorflow chabani$ sudo cp cuda/lib/libcudnn.7.dylib /usr/local/cuda/include
(deepspeech-venv) Chabanis-MacBook-Pro:tensorflow chabani$ sudo cp cuda/lib/libcudnn.dylib /usr/local/cuda/include
我运行配置如下
(deepspeech-venv) Chabanis-MacBook-Pro:tensorflow chabani$ ./configure
WARNING: --batch mode is deprecated. Please instead explicitly shut down your Bazel server using the command "bazel shutdown".
You have bazel 0.24.1 installed.
Please specify the location of python. [Default is /Users/chabani/tmp/deepspeech-venv/bin/python]:
Traceback (most recent call last):
File "<string>", line 1, in <module>
AttributeError: module 'site' has no attribute 'getsitepackages'
Found possible Python library paths:
/Users/chabani/tmp/deepspeech-venv/lib/python3.7/site-packages
Please input the desired Python library path to use. Default is [/Users/chabani/tmp/deepspeech-venv/lib/python3.7/site-packages]
Do you wish to build TensorFlow with XLA JIT support? [y/N]:
No XLA JIT support will be enabled for TensorFlow.
Do you wish to build TensorFlow with OpenCL SYCL support? [y/N]:
No OpenCL SYCL support will be enabled for TensorFlow.
Do you wish to build TensorFlow with ROCm support? [y/N]: n
No ROCm support will be enabled for TensorFlow.
Do you wish to build TensorFlow with CUDA support? [y/N]: y
CUDA support will be enabled for TensorFlow.
1)Could not find any libcudnn.7*.dylib in any subdirectory:
''
'lib64'
'lib'
'lib/*-linux-gnu'
'lib/x64'
'extras/CUPTI/*'
of:
'/usr'
'/usr/local/cuda'
Asking for detailed CUDA configuration...
Please specify the CUDA SDK version you want to use. [Leave empty to default to CUDA 10]: 10.0
Please specify the cuDNN version you want to use. [Leave empty to default to cuDNN 7]: 7.0
2)Please specify the comma-separated list of base paths to look for CUDA libraries and headers. [Leave empty to use the default]:
-您能否协助处理编号为 1 和 2 的项目?我以为我将 cudnn 文件复制到 cuda 不会导致这个问题
这里有一个问题:您将库复制到 include
而不是 lib
(deepspeech-venv) Chabanis-MacBook-Pro:tensorflow chabani$ sudo cp cuda/lib/libcudnn.7.dylib /usr/local/cuda/include
(deepspeech-venv) Chabanis-MacBook-Pro:tensorflow chabani$ sudo cp cuda/lib/libcudnn.dylib /usr/local/cuda/include
尝试将它们移到 cuda/lib
中
我目前正在配置安装了 CUDA 10.0 和 cudnn 7.5 的 tensorflow 1.14,以构建我的 Deepspeech 二进制文件。
终端代码找不到文件错误:
1) Could not find any libcudnn.7*.dylib in any subdirectory:
''
'lib64'
'lib'
'lib/*-linux-gnu'
'lib/x64'
'extras/CUPTI/*'
of:
'/usr'
'/usr/local/cuda'
Asking for detailed CUDA configuration...
2) Please specify the comma-separated list of base paths to look for CUDA libraries and headers. [Leave empty to use the default]:
我已经将文件从cudnn复制到cuda目录,如下所示:
我先解压文件,然后复制到cuda文件中
(deepspeech-venv) Chabanis-MacBook-Pro:tensorflow chabani$ tar -xzvf cudnn-10.0-osx-x64-v7.5.0.56.tgz
x cuda/include/cudnn.h
x cuda/NVIDIA_SLA_cuDNN_Support.txt
x cuda/lib/libcudnn.7.dylib
x cuda/lib/libcudnn.dylib
x cuda/lib/libcudnn_static.a
(deepspeech-venv) Chabanis-MacBook-Pro:tensorflow chabani$ sudo cp cuda/include/cudnn.h /usr/local/cuda/include
Password:
(deepspeech-venv) Chabanis-MacBook-Pro:tensorflow chabani$ sudo cp cuda/lib/libcudnn.7.dylib /usr/local/cuda/include
(deepspeech-venv) Chabanis-MacBook-Pro:tensorflow chabani$ sudo cp cuda/lib/libcudnn.dylib /usr/local/cuda/include
我运行配置如下
(deepspeech-venv) Chabanis-MacBook-Pro:tensorflow chabani$ ./configure
WARNING: --batch mode is deprecated. Please instead explicitly shut down your Bazel server using the command "bazel shutdown".
You have bazel 0.24.1 installed.
Please specify the location of python. [Default is /Users/chabani/tmp/deepspeech-venv/bin/python]:
Traceback (most recent call last):
File "<string>", line 1, in <module>
AttributeError: module 'site' has no attribute 'getsitepackages'
Found possible Python library paths:
/Users/chabani/tmp/deepspeech-venv/lib/python3.7/site-packages
Please input the desired Python library path to use. Default is [/Users/chabani/tmp/deepspeech-venv/lib/python3.7/site-packages]
Do you wish to build TensorFlow with XLA JIT support? [y/N]:
No XLA JIT support will be enabled for TensorFlow.
Do you wish to build TensorFlow with OpenCL SYCL support? [y/N]:
No OpenCL SYCL support will be enabled for TensorFlow.
Do you wish to build TensorFlow with ROCm support? [y/N]: n
No ROCm support will be enabled for TensorFlow.
Do you wish to build TensorFlow with CUDA support? [y/N]: y
CUDA support will be enabled for TensorFlow.
1)Could not find any libcudnn.7*.dylib in any subdirectory:
''
'lib64'
'lib'
'lib/*-linux-gnu'
'lib/x64'
'extras/CUPTI/*'
of:
'/usr'
'/usr/local/cuda'
Asking for detailed CUDA configuration...
Please specify the CUDA SDK version you want to use. [Leave empty to default to CUDA 10]: 10.0
Please specify the cuDNN version you want to use. [Leave empty to default to cuDNN 7]: 7.0
2)Please specify the comma-separated list of base paths to look for CUDA libraries and headers. [Leave empty to use the default]:
-您能否协助处理编号为 1 和 2 的项目?我以为我将 cudnn 文件复制到 cuda 不会导致这个问题
这里有一个问题:您将库复制到 include
而不是 lib
(deepspeech-venv) Chabanis-MacBook-Pro:tensorflow chabani$ sudo cp cuda/lib/libcudnn.7.dylib /usr/local/cuda/include
(deepspeech-venv) Chabanis-MacBook-Pro:tensorflow chabani$ sudo cp cuda/lib/libcudnn.dylib /usr/local/cuda/include
尝试将它们移到 cuda/lib
中