Skip to content

Instantly share code, notes, and snippets.

@patrickbrus
Created December 15, 2021 07:11
Show Gist options
  • Save patrickbrus/6bbf8e1c241fec60f3bb28f488dfbf7a to your computer and use it in GitHub Desktop.
Save patrickbrus/6bbf8e1c241fec60f3bb28f488dfbf7a to your computer and use it in GitHub Desktop.
FROM python:3.9
WORKDIR /usr/src/app
# We copy just the requirements.txt first to leverage Docker cache
COPY ./requirements.txt ./
RUN pip install --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt
# Let' only copy the required files and folders
ADD ./model ./model
ADD ./data ./data
COPY ./application.py ./
ADD ./templates ./templates
EXPOSE 5000
CMD ["python", "application.py" ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment