Skip to content

Instantly share code, notes, and snippets.

@jtubert
Created July 7, 2019 21:02
Show Gist options
  • Save jtubert/a313155ae46eacfe3d26c37e914dec16 to your computer and use it in GitHub Desktop.
Save jtubert/a313155ae46eacfe3d26c37e914dec16 to your computer and use it in GitHub Desktop.
FROM tensorflow/tensorflow:1.12.0-py3
ENV LANG=C.UTF-8
RUN mkdir /gpt-2
WORKDIR /gpt-2
COPY requirements.txt /gpt-2/
RUN apt-get update && \
apt-get install -y curl
RUN pip3 install -r requirements.txt
ADD . /gpt-2
RUN curl -o model.zip https://storage.googleapis.com/my-models/model.zip
RUN unzip model.zip -d ./models
ENV PORT 8000
CMD exec gunicorn --chdir /gpt-2/src --bind :$PORT --workers 1 app:app
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment