File size: 582 Bytes
0d61a38
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
27
28
FROM python:3.12.2

# Set environment variables
ENV PYTHONUNBUFFERED=1 \
    NLTK_DATA=/root/nltk_data \
    FLASK_ENV=production \
    FLASK_APP=app.py \
    PORT=5003

# Set working directory in container
WORKDIR /app

# Copy the current directory contents into the container
COPY . .

# Install dependencies
RUN pip install -r requirements.txt

# Preload NLTK data
RUN python -m nltk.downloader punkt punkt_tab -d /root/nltk_data

# Expose the port the app runs on
EXPOSE 5003

# Run the Flask app
# CMD ["gunicorn", "app:app", "--bind", "0.0.0.0:5000"]
CMD ["python", "app.py"]