File size: 598 Bytes
c3637f5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
FROM python:3.10-slim

# Set working directory
WORKDIR /app

# Install system packages (nltk needs some)
RUN apt-get update && apt-get install -y \

    build-essential \
    git \
    && rm -rf /var/lib/apt/lists/*

# Copy everything to container
COPY . .

# Install dependencies
RUN pip install --upgrade pip
RUN pip install -r requirements.txt

# Download NLTK data
RUN python -c "import nltk; nltk.download('punkt'); nltk.download('stopwords'); nltk.download('wordnet')"

# Start app using gunicorn
CMD [\"gunicorn\", \"-w\", \"4\", \"-b\", \"0.0.0.0:7860\", \"app:app\"]