linh-hk commited on
Commit
8d4bae4
·
1 Parent(s): e181215

Use gunicorn

Browse files
Files changed (3) hide show
  1. Dockerfile +4 -3
  2. README.md +1 -0
  3. requirements.txt +1 -0
Dockerfile CHANGED
@@ -11,15 +11,16 @@ ENV PYTHONDONTWRITEBYTECODE=1 \
11
 
12
  WORKDIR /app
13
 
 
 
 
14
  # Install Python deps
15
  COPY --chown=user ./requirements.txt requirements.txt
16
  RUN pip install --no-cache-dir --upgrade -r requirements.txt
17
 
18
- # Copy your app
19
- COPY --chown=user . /app
20
 
21
  # Expose the port Hugging Face expects
22
  EXPOSE 7860
23
 
24
  # Run your app (it will read $PORT below)
25
- CMD ["python", "app.py"]
 
11
 
12
  WORKDIR /app
13
 
14
+ # Copy your app
15
+ COPY --chown=user . /app
16
+
17
  # Install Python deps
18
  COPY --chown=user ./requirements.txt requirements.txt
19
  RUN pip install --no-cache-dir --upgrade -r requirements.txt
20
 
 
 
21
 
22
  # Expose the port Hugging Face expects
23
  EXPOSE 7860
24
 
25
  # Run your app (it will read $PORT below)
26
+ CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:7860", "app:app"]
README.md CHANGED
@@ -4,6 +4,7 @@ emoji: 🐢
4
  colorFrom: gray
5
  colorTo: blue
6
  sdk: docker
 
7
  pinned: false
8
  short_description: Trying to move from Gradio to Flask
9
  ---
 
4
  colorFrom: gray
5
  colorTo: blue
6
  sdk: docker
7
+ app_file: app.py
8
  pinned: false
9
  short_description: Trying to move from Gradio to Flask
10
  ---
requirements.txt CHANGED
@@ -6,6 +6,7 @@ flask-socketio==5.5.1
6
  gensim==4.3.3
7
  gspread==6.2.0
8
  gspread-dataframe==4.0.0
 
9
  huggingface-hub==0.30.2
10
  lxml
11
  nltk==3.9.1
 
6
  gensim==4.3.3
7
  gspread==6.2.0
8
  gspread-dataframe==4.0.0
9
+ gunicorn==23.0.0
10
  huggingface-hub==0.30.2
11
  lxml
12
  nltk==3.9.1