Created
July 21, 2018 20:58
-
-
Save mvsusp/ab01bbcbb95c354fa5517a1b38c8181d to your computer and use it in GitHub Desktop.
Creating the Docker container
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Using the official tensorflow serving image from docker hub as base image | |
FROM tensorflow/serving | |
# Installing NGINX, used to rever proxy the predictions from SageMaker to TF Serving | |
RUN apt-get update && apt-get install -y --no-install-recommends nginx git | |
# Copy our model folder to the container | |
COPY saved_model_half_plus_three /saved_model_half_plus_three | |
# Copy NGINX configuration to the container | |
COPY nginx.conf /etc/nginx/nginx.conf | |
# starts NGINX and TF serving pointing to our model | |
ENTRYPOINT service nginx start | tensorflow_model_server --rest_api_port=8501 \ | |
--model_name=half_plus_three \ | |
--model_base_path=/saved_model_half_plus_three |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment