File size: 671 Bytes
ab5b4c5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
346d8a9
 
ab5b4c5
 
a36c8fd
 
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
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 mkdir -p /app/nltk_data && \
    python -c "import nltk; nltk.download('punkt', download_dir='/app/nltk_data'); nltk.download('stopwords', download_dir='/app/nltk_data'); nltk.download('wordnet', download_dir='/app/nltk_data')"

# Start app using gunicorn
CMD gunicorn -w 4 -b 0.0.0.0:7860 app:app