So, let’s get started. I’m not going to bother trying to build my own docker image like he shows in the guide, I’ll just try to use the one he made.
Pull the docker image:
docker pull gauravkaila/tf_serving_cpu
(It’s big and it takes a while)
Spin up the container
docker run -it -d -P --name tf_serving_cpu -p 3000:3000 gauravkaila/tf_serving_cpu
I’m also not going to try to bother building a model like he does (though I do aspire to someday), I’m just going to try with one of the prebuilt models from the model zoo
In my case, I hope my old mac mini can manage faster_rcnn_inception_v2_coco, so I download that to my hass.io box and unzip it
tar -xvzf faster_rcnn_inception_v2_coco_2018_01_28.tar.gz
Then I use portainer to create a shell in my tf_serving_cpu container and I make a folder to hold my model:
Then I go back into the host debian server and copy my tensorflow model over to my folder in the running tf_serving_cpu container.
docker cp ./faster_rcnn_inception_v2_coco_2018_01_28 tf_serving_cpu:/modeldir
Then I pop back into the tf_serving_container in my portainer shell and try to start it up…
bazel-bin/tensorflow_serving/model_servers/tensorflow_model_server --port=3000 --model_name=obj_det --model_base_path=/modeldir/saved_model &> obj_det &
as I don’t really know what I’m doing, I also tried
bazel-bin/tensorflow_serving/model_servers/tensorflow_model_server --port=3000 --model_name=obj_det --model_base_path=/modeldir &> obj_det &
Unfortunately in both cases, I am met with a not nice message
Aborted (core dumped)
When I check my log in obj_det, I find:
2019-02-15 21:30:09.726026: F external/org_tensorflow/tensorflow/core/platform/cpu_feature_guard.cc:36] The TensorFlow library was compiled to use SSE4.2 instructions, but these aren't available on your machine.
Looks like he had a nicer CPU than me… So I need to see what I can do to remedy this… Maybe one of the precompiled builds from here can save my bacon… Otherwise I will try to compile it myself.
I’ll let you know what I come up with when I get a chance to try and fix it.