summaryrefslogtreecommitdiff
path: root/notes/frameworks/installations.md
blob: f15f4157bc8b01e8c8d0c2b5f4343139a8fd271f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Installations


## DLIB

```
# Install dlib with CUDA enabled
# installing in conda env python=3.6

# clone
git clone https://github.com/davisking/dlib

# vars
export CUDA_HOME=/usr/local/cuda
export LD_LIBRARY_PATH=$CUDA_HOME/lib64:$LD_LIBRARY_PATH
export PATH=$CUDA_HOME/bin:$PATH

# make
#mkdir build; cd build; cmake .. ; cmake --build .
mkdir build; cd build; cmake .. -DUSE_AVX_INSTRUCTIONS=1; cmake --build .

# install
#python setup.py install
python setup.py install --yes USE_AVX_INSTRUCTIONS --yes DLIB_USE_CUDA

# test
cd dlib/test
mkdir build
cd build
cmake ..
cmake --build . --config Release
./dtest --runall

# test cuda
python -c "import dlib; print('CUDA enabled:', dlib.DLIB_USE_CUDA)"
```