Futuresony commited on
Commit
e073f8a
·
verified ·
1 Parent(s): 45547ed

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +15 -0
Dockerfile ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10 # Choose a Python version compatible with your packages
2
+
3
+ WORKDIR /app
4
+
5
+ COPY requirements.txt .
6
+ RUN pip install --no-cache-dir -r requirements.txt
7
+
8
+ COPY app.py . # Copy your Flask application file
9
+
10
+ # If you need to download spacy models or other assets on build
11
+ RUN python -m spacy download en_core_web_sm
12
+
13
+ # Command to run your Flask application using a production-ready WSGI server like Gunicorn
14
+ # This command tells Gunicorn to run the 'app' Flask instance found in 'app.py'
15
+ CMD exec gunicorn --bind 0.0.0.0:$PORT --workers 1 --threads 8 --timeout 0 app:app