在conda环境中安装支持gpu的Dlib不起作用

2024-09-30 22:16:38 发布

您现在位置:Python中文网/ 问答频道 /正文

我创建了一个conda virtual env,只是为了在gpu支持下运行dlib,在其中我从pip install cmakeconda install cudatoolkit cudnn安装了cmake、CUDA和cuDNN,之后我尝试从带有python setup.py install --set DLIB_USE_CUDA=1 --set USE_AVX_INSTRUCTIONS=1的站点下载文件夹运行dlibs setup.py,但它没有检测到任何CUDA安装,正如流程的以下部分所示:

Invoking CMake setup: 'cmake /home/gustavostahl/Downloads/dlib-19.19/tools/python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/home/gustavostahl/Downloads/dlib-19.19/build/lib.linux-x86_64-3.7 -DPYTHON_EXECUTABLE=/home/gustavostahl/anaconda3/envs/dlib_gpu/bin/python -DDLIB_USE_CUDA=1 -DUSE_AVX_INSTRUCTIONS=1 -DCMAKE_BUILD_TYPE=Release'
-- pybind11 v2.2.2
-- Using CMake version: 3.16.3
-- Compiling dlib version: 19.19.0
-- SSE4 instructions can be executed by the host processor.
-- AVX instructions can be executed by the host processor.
-- Enabling AVX instructions
-- Searching for BLAS and LAPACK
-- Searching for BLAS and LAPACK
-- Checking for module 'cblas'
--   No package 'cblas' found
-- Found OpenBLAS library
-- Using OpenBLAS's built in LAPACK
-- Could NOT find CUDA: Found unsuitable version ".", but required is at least "7.5" (found /home/gustavostahl/anaconda3/envs/dlib_gpu/conda-meta)
-- DID NOT FIND CUDA
-- Disabling CUDA support for dlib.  DLIB WILL NOT USE CUDA
-- C++11 activated.

我的计划是在GPU中运行dlib.train_shape_predictor,以加快训练时间


Tags: installcmakehomeforgpuuseversionsetup