Created
December 20, 2019 23:56
-
-
Save leehanchung/a5ea3ceb709282970ff8dc70f2072fb9 to your computer and use it in GitHub Desktop.
NGINX configuration file for Tensorflow Serving Docker image on AWS Sagemaker
This file contains 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
events { | |
# determines how many requests can simultaneously be served | |
worker_connections 2048; | |
} | |
http { | |
server { | |
# Increase JSON POST payload to bypass 413 Client Error: Request Entity Too Large for URL | |
client_max_body_size 100M; | |
# Sagemaker listens to 8080 port and requires /invocations and /ping endpoints | |
listen 8080 deferred; | |
# redirects requests from SageMaker to TF Serving | |
location /invocations { | |
proxy_pass http://localhost:8501/v1/models/<<model name here>>>:predict; | |
} | |
location /ping { | |
return 200 "OK"; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment