File size: 483 Bytes
2a1488f d664a04 32db3e6 d664a04 2a1488f d664a04 2a1488f d664a04 2a1488f d664a04 32db3e6 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
FROM python:3.9-slim
WORKDIR /app
# install gcc so that any C-extensions (if needed) can build
RUN apt-get update \
&& apt-get install -y --no-install-recommends build-essential \
&& rm -rf /var/lib/apt/lists/*
# install Python deps
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# copy your app
COPY . .
# expose the port
EXPOSE 7860
# run with gunicorn
CMD ["gunicorn", "--workers", "2", "--timeout", "120", "--bind", "0.0.0.0:7860", "app:app"]
|