File size: 350 Bytes
c0cec1d
 
 
 
 
 
 
 
 
 
3d052c5
c0cec1d
 
 
3d052c5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
FROM python:3.11-slim

RUN apt-get update && apt-get install -y gcc && rm -rf /var/lib/apt/lists/*

WORKDIR /app
COPY . .

# Pre-compile the binary at image build time
RUN gcc -O2 -o mdc mdc.c -lm

RUN pip install --no-cache-dir flask gunicorn

EXPOSE 7860

CMD ["gunicorn", "--bind", "0.0.0.0:7860", "--workers", "2", "--timeout", "120", "app:app"]