Jeet_Bhardwaj
Update Dockerfile
3b7395e verified
Raw History Blame Contribute Delete
531 Bytes
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