Skip to content

Instantly share code, notes, and snippets.

@BenHall
Created April 11, 2017 15:44
Show Gist options
  • Save BenHall/f2525e7c5292e7b943431d78da302ef3 to your computer and use it in GitHub Desktop.
Save BenHall/f2525e7c5292e7b943431d78da302ef3 to your computer and use it in GitHub Desktop.
tensorflow-serving Dockerfile
FROM katacoda/tensorflow-serving-devel:latest
WORKDIR /serving
EXPOSE 9000
CMD ["bazel-bin/tensorflow_serving/model_servers/tensorflow_model_server", "--port=9000", "--model_name=inception", "--model_base_path=inception-export"]
# Client Example
# bazel-bin/tensorflow_serving/example/inception_client --server=localhost:9000 --image=/path/to/my_cat_image.jpg
COPY . /serving
RUN cd /serving/tensorflow && \
echo '\n' | ./configure && \
cd .. && \
bazel build -c opt tensorflow_serving/...
RUN curl -O http://download.tensorflow.org/models/image/imagenet/inception-v3-2016-03-01.tar.gz && \
tar xzf inception-v3-2016-03-01.tar.gz && \
rm inception-v3-2016-03-01.tar.gz
RUN bazel-bin/tensorflow_serving/example/inception_saved_model --checkpoint_dir=inception-v3 --output_dir=inception-export
@BenHall
Copy link
Author

BenHall commented Apr 11, 2017

echo '\n' | ./configure causes it to fail at the moment. Build manually :'(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment