FACE01 uses CUDA to maximize GPU utilization. Normally, by typing pip install dlib
in the terminal, CUDA can be used according to the usage environment.
To check if CUDA is available:
(FACE01)
FACE01 $ pip freeze | grep dlib
dlib==19.24.0
(FACE01)
FACE01 $ python
Python 3.8.10 (default, Nov 14 2022, 12:59:47)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import dlib
>>> dlib.DLIB_USE_CUDA
True
>>>
If False
at this time, CUDA cannot be used.
Please uninstall Dlib once as follows.
pip uninstall dlib
Unzip dlib-19.24.tar.bz2
to create dlib-19.24
directory.
tar xvjf dlib-19.24.tar.bz2
cd dlib-19.24
The gcc version is very important when building Dlib. gcc
versions later than 8
are not supported. Specify gcc-8 etc. as follows.
(FACE01)
FACE01/dlib-19.24 $ export CC=/usr/bin/gcc-8
(FACE01)
FACE01/dlib-19.24 $ export CXX=/usr/bin/g++-8
(FACE01)
FACE01/dlib-19.24 $ python setup.py install
(FACE01)
FACE01/dlib-19.24 $ pip freeze | grep dlib
dlib==19.24.0
(FACE01)
FACE01/dlib-19.24 $ python
Python 3.8.10 (default, Nov 14 2022, 12:59:47)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import dlib
>>> dlib.DLIB_USE_CUDA
True
>>>
(FACE01)
FACE01/dlib-19.24 $
If you can confirm that it is True
, you are finished:tada:.