jolibrain / deepdetect

Deep Learning API and Server in C++14 support for Caffe, PyTorch,TensorRT, Dlib, NCNN, Tensorflow, XGBoost and TSNE
https://www.deepdetect.com/
Other
2.51k stars 561 forks source link

Docker, api gateway and queues related questions #245

Open roscopecoltran opened 7 years ago

roscopecoltran commented 7 years ago

Hi guys,

Hope you are all well !

I have quick 4 questions:

1. Does anyone have a docker-compose template with deepdetect + elasticsearch ?

I would like to test the content of your blog post @beniz (link) and to probably create an api gateway to queue the same input to bind some other image classifier/models with [krakend] and aggregate a nested response.

And to create an image pre-processing pipeline with imaginary or any go based webservice, forwarding/queuing

Ultimately, I would integrate searchkit to browse the catalog of images (demo link) with admin-on-rest as an web admin interface.

ps. Searchkit is a suite of UI components built in react. The aim is to rapidly create beautiful search applications using declarative components, and without being an ElasticSearch expert.

2. Is there any previous attempt to build a docker image based on Alpine v3.4/3.5 ?

It would be awesome to have smaller images for a deployment with kubernetes for eg. I saw that deepdetect is cmake based, so for managing dependencies and version; hunter would be a good fit .

3. GRPC/RPC (Protobuf,Thrift), queueing images to detect Is there any rpc client/server feature for deepdetect on the roadmap ? would make easier, faster and more reliable a queued flow of image training if the other micro-services are written in golang.

I could not find any info about it. I saw only a curl/json based api.

Have a good day and week all !

Cheers, Richard

beniz commented 7 years ago

Hi Richard,

Thanks for the details, some answers below:

  1. No docker-compose yet, let us know if you are willing to contribute it to the existing docker templates. We are familiar with searchkit but not the other tools.

  2. Alpine docker build: not that I know of, due to available packages and CUDA issues, we only professionally support Ubuntu 14.04 and Ubuntu 16.04. We're not familiar with hunter, let us know if you contribute something with it around DD.

  3. GRPC: this is not on the roadmap at the moment, though not difficult to contribute. DD's internals are independent of the HTTP/1 and JSON outputs, there's a even a command line example. It's a little known fact but DD is actually more of a generic C++ library on top of Caffe, Tensorflow and XGBoost. This means that an alternative to jsonapi.cc could use protocol buffers and similarly an alternative to httpjsonapi.cc could use gRPC.

On why REST and gRPC, these slides are very useful: https://speakerdeck.com/thesandlord/grpc-vs-rest-api-strat-2016. Basically, now that our REST API is well established, we could improve performances in some settings by supporting gRPC. At the moment, we have not yet studied whether and how the streaming part would best be beneficial.