File size: 531 Bytes
b213a9b
84f232d
 
 
b213a9b
3b7395e
84f232d
 
 
 
 
 
 
b213a9b
84f232d
3b7395e
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
FROM python:3.10-slim

WORKDIR /app

RUN apt-get update && apt-get install -y --no-install-recommends \
    gcc g++ libglib2.0-0 libsm6 libxext6 libxrender1 libgomp1 \
    && rm -rf /var/lib/apt/lists/*

COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

COPY . .

RUN python -c "import nltk; nltk.download('punkt', quiet=True); nltk.download('stopwords', quiet=True)"

# THIS LINE FIXES THE "" PORT ERROR FOREVER
CMD gunicorn app:app --bind 0.0.0.0:${PORT:-7860} --workers 1 --timeout 300 --keep-alive 120