JoseMSL commited on
Commit
289ef67
·
verified ·
1 Parent(s): fa8e7c4

Upload 2 files

Browse files

Use gunicorn as WSGI server

Files changed (2) hide show
  1. Dockerfile +1 -1
  2. requirements.txt +1 -0
Dockerfile CHANGED
@@ -10,4 +10,4 @@ COPY . .
10
  ENV PORT=7860
11
  EXPOSE 7860
12
 
13
- CMD ["python", "bert_api.py"]
 
10
  ENV PORT=7860
11
  EXPOSE 7860
12
 
13
+ CMD ["gunicorn", "--bind", "0.0.0.0:7860", "--workers", "2", "--preload", "--timeout", "120", "bert_api:app"]
requirements.txt CHANGED
@@ -4,3 +4,4 @@ transformers
4
  torch
5
  huggingface_hub
6
  python-dotenv
 
 
4
  torch
5
  huggingface_hub
6
  python-dotenv
7
+ gunicorn