2023-08-31 23:30:53 +00:00
|
|
|
#!/usr/bin/env sh
|
|
|
|
|
|
|
|
export LD_PRELOAD="/usr/lib/$(arch)-linux-gnu/libmimalloc.so.2"
|
|
|
|
|
|
|
|
: "${MACHINE_LEARNING_HOST:=0.0.0.0}"
|
|
|
|
: "${MACHINE_LEARNING_PORT:=3003}"
|
|
|
|
: "${MACHINE_LEARNING_WORKERS:=1}"
|
2023-09-07 01:27:29 +00:00
|
|
|
: "${MACHINE_LEARNING_WORKER_TIMEOUT:=120}"
|
2023-08-31 23:30:53 +00:00
|
|
|
|
|
|
|
gunicorn app.main:app \
|
|
|
|
-k uvicorn.workers.UvicornWorker \
|
|
|
|
-w $MACHINE_LEARNING_WORKERS \
|
|
|
|
-b $MACHINE_LEARNING_HOST:$MACHINE_LEARNING_PORT \
|
2023-09-07 01:27:29 +00:00
|
|
|
-t $MACHINE_LEARNING_WORKER_TIMEOUT \
|
2023-09-02 01:59:17 +00:00
|
|
|
--log-config-json log_conf.json
|