OpenPose 使用 Ubuntu 20 CuDNN 8 CMAKE 找不到 CuDNN

问题描述 投票:0回答:1

我在

CuDNN 8
上安装了
Ubuntu 20.04
我想安装 OpenPose 但我收到一条消息,找不到 CuDNN:

~/Downloads/openpose/build((HEAD detached at v1.7.0))$ cmake .. -DBUILD_PYTHON=ON -DPYTHON_EXECUTABLE=/usr/bin/python3 -DCUDNN_INCLUDE_DIR=/usr/lib/cuda/include -DCUDNN_LIBRARY=/usr/lib/cuda/lib64
CMake Warning (dev) at CMakeLists.txt:29 (project):
  cmake_minimum_required() should be called prior to this top-level project()
  call.  Please see the cmake-commands(7) manual for usage documentation of
  both commands.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- The C compiler identification is GNU 9.4.0
-- The CXX compiler identification is GNU 9.4.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- GCC detected, adding compile flags
-- GCC detected, adding compile flags
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Found CUDA: /usr/local/cuda-11.7 (found version "11.7") 
-- Building with CUDA.
-- CUDA detected: 11.7
-- Added CUDA NVCC flags for: sm_61
-- cuDNN not found
-- Found GFlags: /usr/include  
-- Found gflags  (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/libgflags.so)
-- Found Glog: /usr/include  
-- Found glog    (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/libglog.so)
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-lpthread (found version "3.6.1") 
-- Found OpenCV: /usr (found version "4.2.0") 
-- cuDNN not found.
#!/bin/bash

echo "This script assumes Ubuntu 16 or 14 and Nvidia Graphics card up to 10XX. Otherwise, it will fail."

# Install cuDNN 5.1
if [[ $UBUNTU_VERSION == *"14."* ]] || [[ $UBUNTU_VERSION == *"15."* ]] || [[ $UBUNTU_VERSION == *"16."* ]]; then
    CUDNN_URL="http://developer.download.nvidia.com/compute/redist/cudnn/v5.1/cudnn-8.0-linux-x64-v5.1.tgz"
    wget -c ${CUDNN_URL}
    sudo tar -xzf cudnn-8.0-linux-x64-v5.1.tgz -C /usr/local
    rm cudnn-8.0-linux-x64-v5.1.tgz && sudo ldconfig
else
    echo "cuDNN NOT INSTALLED! Ubuntu 16 or 14 not found. Install cuDNN manually from 'https://developer.nvidia.com/cudnn'."
fi
CMake Error at CMakeLists.txt:531 (message):
  Install cuDNN using the above commands.  or turn off cuDNN by setting
  USE_CUDNN to OFF.


-- Configuring incomplete, errors occurred!

你能告诉我如何解决这个问题吗?提前致谢。

cmake nvidia cudnn openpose
1个回答
0
投票

再次安装 CuDNN 作为 提到这里 使用:

sudo apt install libcudnn8 libcudnn8-dev

解决了我的问题

© www.soinside.com 2019 - 2024. All rights reserved.