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

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -5
Dockerfile CHANGED
@@ -1,15 +1,20 @@
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
 
1
+
2
+ FROM python:3.10
3
+ # Use a Python version compatible with your packages
4
 
5
  WORKDIR /app
6
 
7
+ # Copy requirements.txt first to leverage Docker cache
8
  COPY requirements.txt .
9
  RUN pip install --no-cache-dir -r requirements.txt
10
 
11
+ # Copy your application code and other necessary files
12
+ COPY app.py .
13
+ # COPY your_service_account_file.json . # If you use a JSON file instead of base64 secret
14
 
15
  # If you need to download spacy models or other assets on build
16
+ # RUN python -m spacy download en_core_web_sm # Uncomment if you need this model
17
 
18
+ # Command to run your Flask application using Gunicorn
19
+ # This assumes your Flask application instance is named 'app' in 'app.py'
20
  CMD exec gunicorn --bind 0.0.0.0:$PORT --workers 1 --threads 8 --timeout 0 app:app