snowzach / doods

DOODS - Dedicated Open Object Detection Service
MIT License
303 stars 31 forks source link

Unable to build cuda image #27

Closed cmbroth closed 4 years ago

cmbroth commented 4 years ago

I am trying to rebuild the cuda image so that the nvidia libraries in the docker image and the docker kernel versions on the host os to match.

When running to build the image with the following command: docker build -f Dockerfile.base.cuda --pull .

I get an error during the compilation of one of the components:

# Compiling...
go build -ldflags "-X github.com/snowzach/doods/conf.Executable=doods -X github.com/snowzach/doods/conf.GitVersion=v0.2.1-0-g91828a0-dirty" -o doods
# github.com/snowzach/doods/detector/tflite/go-tflite/delegates/edgetpu
In file included from detector/tflite/go-tflite/delegates/edgetpu/edgetpu.go:5:0:
./edgetpu.go.h:8:10: fatal error: tensorflow/lite/c/c_api.h: No such file or directory
 #include <tensorflow/lite/c/c_api.h>
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
# github.com/snowzach/doods/detector/tflite/go-tflite
In file included from detector/tflite/go-tflite/tflite.go:5:0:
./tflite.go.h:8:10: fatal error: tensorflow/lite/c/c_api.h: No such file or directory
 #include <tensorflow/lite/c/c_api.h>
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [doods] Error 2
snowzach commented 4 years ago

Try it now with Dockerfile.cuda

cmbroth commented 4 years ago

Where do I find that file?

snowzach commented 4 years ago

I just updated the repo with new build files for the cuda image. Bonus points if you can figure out what I have to cache so it doesn't take so long to start the image. It supposedly has to do with it pre-compiling the cuda image for whatever graphics card you are using. It takes like 2-3 minutes for me. Supposedly if you map /root/.nv to a docker image it will start faster but it didn't work for me.

snowzach commented 4 years ago

Closing for now.