5

I have created a conda virtual env just to run dlib with gpu support, in it i installed cmake, CUDA and cuDNN from pip install cmake and conda install cudatoolkit cudnn, after that i tried to run dlibs setup.py from the site downloaded folder with python setup.py install --set DLIB_USE_CUDA=1 --set USE_AVX_INSTRUCTIONS=1, but it didn't detect any cuda installation, as seem from the following section of the process:

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.

My plan is to run dlib.train_shape_predictor in the GPU to speed training time

talonmies
  • 70,661
  • 34
  • 192
  • 269
Gustavo Stahl
  • 101
  • 1
  • 7
  • I'm running into the same issue. Have you had any luck since posting this question? – Skum Aug 26 '21 at 09:51
  • @Skum sorry, I do not. Eventually, I gave up on it and got stuck with running Dlib on the CPU – Gustavo Stahl Sep 07 '21 at 18:34
  • alright, thanks for the reply. I personally ended up creating a docker container in which the base installation of python supports CUDA and dlib and my program uses the base installation instead of a conda environment – Skum Sep 08 '21 at 09:34

0 Answers0