Skip to content

Instantly share code, notes, and snippets.

@canhtran
Created July 14, 2019 17:36
Show Gist options
  • Save canhtran/66672255987a787515ae1944de106446 to your computer and use it in GitHub Desktop.
Save canhtran/66672255987a787515ae1944de106446 to your computer and use it in GitHub Desktop.
data-devops-medium blog
FROM python:3.6
LABEL maintainer "Calvin Tran <[email protected]>"
ENV APP_HOME /app
RUN mkdir -p $APP_HOME
WORKDIR $APP_HOME
COPY requirements.txt $APP_HOME
RUN apt-get update && \
pip install -I --no-cache-dir -r requirements.txt && \
rm requirements.txt && \
rm -rf /var/lib/apt/list/*
COPY app.py $APP_HOME
COPY model.pkl $APP_HOME
CMD gunicorn -w 3 -b 0.0.0.0:5000 --timeout=120 --reload "app:app"
VOLUME $APP_HOME
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment