Build Nvidia/Caffe for digits

I have Cuda 9.1 and Cudnn 7.1 and I checked the nvcc -V

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2017 NVIDIA Corporation
Built on Fri_Nov__3_21:07:56_CDT_2017
Cuda compilation tools, release 9.1, V9.1.85

but when I try to make the caffe I found this build summary as output

--   Build type        :   Release
-- 
--   BUILD_SHARED_LIBS :   ON
--   BUILD_python      :   ON
--   BUILD_matlab      :   OFF
--   BUILD_docs        :   ON
--   USE_LEVELDB       :   ON
--   USE_LMDB          :   ON
--   ALLOW_LMDB_NOLOCK :   OFF
--   TEST_FP16         :   OFF
-- 
-- Dependencies:
--   BLAS              :   Yes (Open)
--   Boost             :   Yes (ver. 1.58)
--   glog              :   Yes
--   gflags            :   Yes
--   protobuf          :   Yes (ver. 2.6.1)
--   lmdb              :   Yes (ver. 0.9.17)
--   LevelDB           :   Yes (ver. 1.18)
--   Snappy            :   Yes (ver. 1.1.3)
--   OpenCV            :   Yes (ver. 3.3.1)
--   JPEGTurbo         :   Yes
--   CUDA              :   Yes (ver. 9.1)
-- 
-- NVIDIA CUDA:
--   Target GPU(s)     :   Auto
--   GPU arch(s)       :   sm_61
--   cuDNN             :   Yes (ver. 6.0)
--   NCCL              :   Not found (not requested)
--   NVML              :   /usr/lib/nvidia-390/libnvidia-ml.so 
-- 
-- Python:
--   Interpreter       :   /usr/bin/python2 (ver. 2.7.12)
--   Libraries         :   /usr/lib/x86_64-linux-gnu/libpython2.7.so (ver 2.7.12)
--   NumPy             :   /home/zaher/.local/lib/python2.7/site-packages/numpy/core/include (ver 1.14.0)
-- 
-- Documentaion:
--   Doxygen           :   /usr/bin/doxygen (1.8.11)
--   config_file       :   /home/zaher/NVCaffe/caffe/.Doxyfile
-- 
-- Install:
--   Install path      :   /home/zaher/NVCaffe/caffe/build/install
-- 
-- Configuring done
-- Generating done

so, it detecte all libcudnn file and cudnn.h all of them are v7.

I had to remove every file related to cuda by this command

sudo apt-get remove --purge cuda*

then reinstall everything again

A video walkthrough of natively installing NVIDIA DIGITS on Ubuntu 18.04 LTS is available here:

https://cudaeducation.com/nvidiadigits/

-Cuda Education
cudaeducation.com