File size: 580 Bytes
ddc7937
 
 
 
 
 
 
 
 
 
 
 
 
74cb5db
ddc7937
 
 
 
b6be9f9
 
ddc7937
 
 
 
f7b9473
 
b6be9f9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# syntax=docker/dockerfile:1.6
FROM python:3.12-slim

WORKDIR /app

RUN apt-get update && apt-get install -y --no-install-recommends \
    ffmpeg \
    libsm6 \
    libxext6 \
    libxrender-dev \
    libgomp1 \
    libglib2.0-0 \
    git \
    && rm -rf /var/lib/apt/lists/*

RUN --mount=type=secret,id=GITHUB_REPO,required=true \
    git clone $(cat /run/secrets/GITHUB_REPO) .

RUN pip install --no-cache-dir -r requirements.txt \
    gunicorn

ENV FLASK_ENV=production
ENV PORT=7860

EXPOSE 7860

CMD ["gunicorn", "-w", "2", "--threads", "4", "-b", "0.0.0.0:7860", "app:app"]