arya123321 commited on
Commit
493c63b
·
1 Parent(s): de5862e
Files changed (1) hide show
  1. Dockerfile +4 -3
Dockerfile CHANGED
@@ -6,8 +6,9 @@ RUN useradd -m -u 1000 user
6
  USER user
7
  ENV PATH="/home/user/.local/bin:$PATH"
8
 
9
- # Set Hugging Face cache directory
10
  ENV HF_HOME=/app/hf_cache
 
11
 
12
  # Set working directory
13
  WORKDIR /app
@@ -22,5 +23,5 @@ RUN mkdir -p /app/hf_cache && chown user:user /app/hf_cache
22
  # Copy the rest of the application files
23
  COPY --chown=user . /app
24
 
25
- # Use Gunicorn to serve the Flask app
26
- CMD ["gunicorn", "--bind", "0.0.0.0:7860", "chatbot:app"]
 
6
  USER user
7
  ENV PATH="/home/user/.local/bin:$PATH"
8
 
9
+ # Set Hugging Face cache directory and disable tokenizer parallelism
10
  ENV HF_HOME=/app/hf_cache
11
+ ENV TOKENIZERS_PARALLELISM=false
12
 
13
  # Set working directory
14
  WORKDIR /app
 
23
  # Copy the rest of the application files
24
  COPY --chown=user . /app
25
 
26
+ # Start Gunicorn with increased timeout and multiple workers
27
+ CMD ["gunicorn", "--bind", "0.0.0.0:7860", "--timeout", "300", "--workers", "2", "chatbot:app"]