LdDl / go-darknet

Go bindings for Darknet (YOLO v4 / v7-tiny / v3)
Apache License 2.0
82 stars 19 forks source link

add docker container for cpu/gpu #5

Closed ghost closed 4 years ago

ghost commented 4 years ago

I have an error for the gpu version

# github.com/LdDl/go-darknet
/usr/bin/ld: warning: libcuda.so.1, needed by /usr/lib/libdarknet.so, not found (try using -rpath or -rpath-link)
/usr/lib/libdarknet.so: undefined reference to `cuCtxGetCurrent'
collect2: error: ld returned 1 exit status

but I have declared the envs LIBRARY_PATH=$LIBRARY_PATH:/usr/local/cuda-10.0/compat/ where libcuda.so.1 is located.

Shall I move the files somewhere else ?

LdDl commented 4 years ago
cuCtxGetCurrent

I think Darknet can't find CUDA lib in /usr/local/cuda/lib

find where libcuda.so.1 located

sudo find /usr/ -name 'libcuda.so.1'

then copy (or move) it to /usr/local/cuda/lib (in my case it lib64)

cp FOUND_PATH/libcuda.so.1 /usr/local/cuda/lib (OR lib64)/libcuda.so.1

p.s. found possible solution here: https://github.com/tensorflow/tensorflow/issues/4078#issuecomment-255129832

ghost commented 4 years ago

In fact I had to

cp /usr/local/cuda-10.0/compat/* /usr/local/cuda-10.0/targets/x86_64-linux/lib/

Thanks for the hand