keras: Doesn't work with cudnn v7.1.1.5
Hi, I have updated nvidia-cuda 9.0 container, which now uses CUDNN_VERSION 7.1.1.5. Now when I try to run keras from keras Docker I have an error:
E tensorflow/stream_executor/cuda/cuda_dnn.cc:378] Loaded runtime CuDNN library: 7101 (compatibility version 7100) but source was compiled with 7004 (compatibility version 7000). If using a binary install, upgrade your CuDNN library to match. If building from sources, make sure the library loaded at runtime matches a compatible version specified during compile configuration.
Tensorflow version: 1.6.0 Keras version: 2.1.4
Which source was compiled with 7004 version? How can I recompile it?
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 5
- Comments: 21
Commits related to this issue
- Downgrade CUDNN 7 to TensorFlow 1.6.0 compatible version https://github.com/keras-team/keras/issues/9567 — committed to darthsuogles/keras by deleted user 6 years ago
- Update Dockerfile-cuDNN to use cudnn704 (#1) cudnn704 is compatible with Tensorflow 1.5 Previous cudnn7115 would cause errors similar to [this reported issue](https://github.com/keras-team/keras/i... — committed to samvantran/spark-dcos-docker by samvantran 6 years ago
@taneta Thanks! that fixed my problem using the downgrade (cudnn 7.1 to 7.0) you gave, here’s just a paste of it with the typos $=s and 9.1=9.0 fix
now my code in docker works with tf 1.6 cuda 9.0 and cudnn 7.0
============================================
USER root
RUN apt-get update && apt-get install -y --allow-downgrades --no-install-recommends
libcudnn7=7.0.5.15-1+cuda9.0 libcudnn7-dev=7.0.5.15-1+cuda9.0 && rm -rf /var/lib/apt/lists/*
RUN apt-get update
My env:
windows-10 64 bit+python 3.5+visual studio 2017 community+cuda toolkit 9.0+cuDNN v7.1.1 (Feb 28, 2018), for CUDA 9.0+tensorflow 1.6-gpuMy failure is
replace
Download cuDNN v7.1.1 (Feb 28, 2018), for CUDA 9.0bycuDNN v7.0.5 (Dec 5, 2017), for CUDA 9.0is ok.So new is
windows-10 64 bit+python 3.5+visual studio 2017 community+cuda toolkit 9.0+cuDNN v7.0.5 (Dec 5, 2017), for CUDA 9.0+tensorflow 1.6-gpu@zhaoyang10 Yes, I understand that this problem because of cudnn version. What I don’t know is how to refer to nvidia/cuda Docker image with cuDNN v7.0.x.
Keras Dockerfile is built on of top Nvidia container:
ARG cuda_version=9.0ARG cudnn_version=7FROM nvidia/cuda:${cuda_version}-cudnn${cudnn_version}-develBut
nvidia/cuda:$9.0-cudnn7-develcontainer now includes cuDNN v7.1.1.5 version and I don’t now how to request the earlier one.tensorflow-gpu==1.5.0 to tensorflow-gpu==1.9.0 solved in my case
@taneta I ran into the same problem running nvidia-docker after upgrading to CUDA 9.1 and CUDNN 7.1. Here is how I was able to fix the issue:
As @zhaoyang10 mentioned, you need to downgrade CUDNN.
First, you can search for available versions using
apt-cache madison libcudnn7. Pick an appropriate version (7.0.x) and then run the following command to downgrade, replacing the CUDNN version with your chosen one (I used an official NVIDIA docker file as a reference):(Then run a quick
apt-get updateto refresh the lists)Hope that helps!
I actually have the same problem as you @taneta. Have you found a solution, yet?
It’s a problem about versions. You can solve this by installing cuDNN v7.0.x.
Thanks very much . when I change cudnn , it still happen same issue. when I change version of tensorflow 1.5 to 1.9 ,It solved. thanks
still I’m comfused that I need a lower version cudnn . why update TF 1.5 t 1.9 can solve problem . I thought 1.5 should to 1.3
so i have the same error and i ftry to use this :apt-get install -y --allow-downgrades --no-install-recommends libcudnn7=7.0.5.15-1+cuda9.0 libcudnn7-dev=7.0.5.15-1+cuda9.0 && rm -rf /var/lib/apt/lists/* But it doesn’t work . Error said: can’t find lib 7.0.5.15-1. So i realize that error happened just because of my libcudnn version . So i remove the early version and install libcudnn7.0.5.15-1 and it’s work. i remove the old version by : rm /usr/local/cuda/include/cudnn.h rm /usr/local/cuda/lib64/libcudnn* ( cuda maybe rename like cuda9.0 or something else but it’s in /usr/local/…) so then i install that again with different version : http://docs.nvidia.com/deeplearning/sdk/cudnn-install/index.html So here is my solution. Hope it can help 😄