chawin.chen commited on
Commit
6e57410
·
1 Parent(s): a6c05de
Files changed (1) hide show
  1. start_local.sh +22 -1
start_local.sh CHANGED
@@ -1,5 +1,26 @@
1
  #!/bin/bash
 
2
  export TZ=Asia/Shanghai
 
 
 
 
3
 
4
- uvicorn app:app --workers 1 --loop asyncio --http httptools --host 0.0.0.0 --port 7860 --timeout-keep-alive 600
 
 
 
5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  #!/bin/bash
2
+
3
  export TZ=Asia/Shanghai
4
+ export OMP_NUM_THREADS=4
5
+ export MKL_NUM_THREADS=4
6
+ export MKL_DEBUG_CPU_TYPE=5
7
+ export KMP_DUPLICATE_LIB_OK=TRUE
8
 
9
+ # 加载 env 文件
10
+ set -a
11
+ source ~/dev-tools/code/facescore/.env
12
+ set +a
13
 
14
+ gunicorn app:app \
15
+ -k uvicorn.workers.UvicornWorker \
16
+ -w 1 \
17
+ -b 0.0.0.0:7860 \
18
+ --timeout 120 \
19
+ --keep-alive 30 \
20
+ --graceful-timeout 60 \
21
+ --max-requests 1000 \
22
+ --max-requests-jitter 100 \
23
+ --worker-connections 1000 \
24
+ --log-level info \
25
+ --access-logfile - \
26
+ --error-logfile -