Skip to content

Instantly share code, notes, and snippets.

@ClementWalter
Last active September 23, 2020 16:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ClementWalter/fd1bfd830e9acbdeccf7671b0d244292 to your computer and use it in GitHub Desktop.
Save ClementWalter/fd1bfd830e9acbdeccf7671b0d244292 to your computer and use it in GitHub Desktop.
Tf servint Heroku dockerfile
FROM tensorflow/serving
ENV MODEL_BASE_PATH /models
ENV MODEL_NAME classifier
COPY models/classifier /models/classifier
# Fix because base tf_serving_entrypoint.sh does not take $PORT env variable while $PORT is set by Heroku
# CMD is required to run on Heroku
COPY tf_serving_entrypoint.sh /usr/bin/tf_serving_entrypoint.sh
RUN chmod +x /usr/bin/tf_serving_entrypoint.sh
ENTRYPOINT []
CMD ["/usr/bin/tf_serving_entrypoint.sh"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment