mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-25 17:22:55 +00:00
feat: Add local model worker parameters (#2974)
This commit is contained in:
parent
33b1cd65b0
commit
e79e7d505d
|
|
@ -24,12 +24,13 @@ class GunicornLocalModelService(BaseService):
|
|||
os.environ.setdefault('SERVER_NAME', 'local_model')
|
||||
log_format = '%(h)s %(t)s %(L)ss "%(r)s" %(s)s %(b)s '
|
||||
bind = f'{CONFIG.get("LOCAL_MODEL_HOST")}:{CONFIG.get("LOCAL_MODEL_PORT")}'
|
||||
worker = CONFIG.get("LOCAL_MODEL_HOST_WORKER", 1)
|
||||
cmd = [
|
||||
'gunicorn', 'smartdoc.wsgi:application',
|
||||
'-b', bind,
|
||||
'-k', 'gthread',
|
||||
'--threads', '200',
|
||||
'-w', "1",
|
||||
'-w', worker,
|
||||
'--max-requests', '10240',
|
||||
'--max-requests-jitter', '2048',
|
||||
'--access-logformat', log_format,
|
||||
|
|
|
|||
|
|
@ -93,7 +93,8 @@ class Config(dict):
|
|||
'SANDBOX': False,
|
||||
'LOCAL_MODEL_HOST': '127.0.0.1',
|
||||
'LOCAL_MODEL_PORT': '11636',
|
||||
'LOCAL_MODEL_PROTOCOL': "http"
|
||||
'LOCAL_MODEL_PROTOCOL': "http",
|
||||
'LOCAL_MODEL_HOST_WORKER': 1
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue