modelling-giants commited on
Commit
3feb4af
·
verified ·
1 Parent(s): f34463e

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -1
Dockerfile CHANGED
@@ -7,10 +7,14 @@ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
7
 
8
  COPY . .
9
 
 
 
 
10
  EXPOSE 7860
11
 
12
  # --timeout 120: bertweet-large is slow to load/infer on free CPU. The default
13
  # gunicorn worker timeout (30s) can kill the worker during a cold start or a
14
  # large review batch, which surfaces to the caller as a failed request (and to
15
  # the leaderboard as a null). 120s gives the model room to load and respond.
16
- CMD ["gunicorn", "-b", "0.0.0.0:7860", "--timeout", "120", "app:app"]
 
 
7
 
8
  COPY . .
9
 
10
+ ENV OMP_NUM_THREADS=1
11
+ ENV TOKENIZERS_PARALLELISM=false
12
+
13
  EXPOSE 7860
14
 
15
  # --timeout 120: bertweet-large is slow to load/infer on free CPU. The default
16
  # gunicorn worker timeout (30s) can kill the worker during a cold start or a
17
  # large review batch, which surfaces to the caller as a failed request (and to
18
  # the leaderboard as a null). 120s gives the model room to load and respond.
19
+ # CMD ["gunicorn", "-b", "0.0.0.0:7860", "--timeout", "120", "app:app"]
20
+ CMD ["gunicorn", "-b", "0.0.0.0:7860", "--workers", "1", "--timeout", "120", "app:app"]