2023-09-18 00:55:40 +00:00
|
|
|
ARG PYTHON_VERSION=3.10.12
|
|
|
|
FROM python:${PYTHON_VERSION}-slim as base
|
|
|
|
|
|
|
|
ENV PYTHONDONTWRITEBYTECODE=1
|
|
|
|
ENV PYTHONUNBUFFERED=1
|
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
RUN apt-get update && apt-get install -y imagemagick && apt-get install -y wget && ls
|
|
|
|
|
|
|
|
RUN wget https://files.ivanch.me/api/public/dl/iFuXSNhw/small-image.png && \
|
|
|
|
wget https://files.ivanch.me/api/public/dl/81Bkht5C/big-image.png && \
|
|
|
|
wget https://files.ivanch.me/api/public/dl/nAndfAjK/video.mp4 && \
|
|
|
|
rm -rf runtimes && \
|
|
|
|
mkdir -p ./static && \
|
|
|
|
mv small-image.png ./static && \
|
|
|
|
mv big-image.png ./static && \
|
|
|
|
mv video.mp4 ./static
|
|
|
|
|
2023-09-21 20:57:47 +00:00
|
|
|
COPY . .
|
|
|
|
|
2023-09-18 00:55:40 +00:00
|
|
|
RUN --mount=type=cache,target=/root/.cache/pip \
|
|
|
|
--mount=type=bind,source=requirements.txt,target=requirements.txt \
|
|
|
|
python -m pip install -r requirements.txt
|
|
|
|
|
|
|
|
EXPOSE 5000
|
|
|
|
|
|
|
|
# Run the application.
|
2023-09-24 13:56:01 +00:00
|
|
|
CMD gunicorn 'app:app' --bind=0.0.0.0:5000 --timeout 3600
|