OmPatel commited on
Commit
0d61a38
·
verified ·
1 Parent(s): 1ec29a2

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +27 -0
Dockerfile ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.12.2
2
+
3
+ # Set environment variables
4
+ ENV PYTHONUNBUFFERED=1 \
5
+ NLTK_DATA=/root/nltk_data \
6
+ FLASK_ENV=production \
7
+ FLASK_APP=app.py \
8
+ PORT=5003
9
+
10
+ # Set working directory in container
11
+ WORKDIR /app
12
+
13
+ # Copy the current directory contents into the container
14
+ COPY . .
15
+
16
+ # Install dependencies
17
+ RUN pip install -r requirements.txt
18
+
19
+ # Preload NLTK data
20
+ RUN python -m nltk.downloader punkt punkt_tab -d /root/nltk_data
21
+
22
+ # Expose the port the app runs on
23
+ EXPOSE 5003
24
+
25
+ # Run the Flask app
26
+ # CMD ["gunicorn", "app:app", "--bind", "0.0.0.0:5000"]
27
+ CMD ["python", "app.py"]