mirror of
https://github.com/clearml/clearml-serving
synced 2025-01-31 10:56:52 +00:00
Change default log level to warning UVICORN_LOG_LEVEL
This commit is contained in:
parent
723878f65d
commit
4a55c10366
@ -8,12 +8,13 @@ echo CLEARML_EXTRA_PYTHON_PACKAGES="$CLEARML_EXTRA_PYTHON_PACKAGES"
|
|||||||
echo CLEARML_SERVING_NUM_PROCESS="$CLEARML_SERVING_NUM_PROCESS"
|
echo CLEARML_SERVING_NUM_PROCESS="$CLEARML_SERVING_NUM_PROCESS"
|
||||||
echo CLEARML_SERVING_POLL_FREQ="$CLEARML_SERVING_POLL_FREQ"
|
echo CLEARML_SERVING_POLL_FREQ="$CLEARML_SERVING_POLL_FREQ"
|
||||||
echo CLEARML_DEFAULT_KAFKA_SERVE_URL="$CLEARML_DEFAULT_KAFKA_SERVE_URL"
|
echo CLEARML_DEFAULT_KAFKA_SERVE_URL="$CLEARML_DEFAULT_KAFKA_SERVE_URL"
|
||||||
echo CLEARML_DEFAULT_KAFKA_SERVE_URL="$CLEARML_DEFAULT_KAFKA_SERVE_URL"
|
|
||||||
|
|
||||||
SERVING_PORT="${CLEARML_SERVING_PORT:-8080}"
|
SERVING_PORT="${CLEARML_SERVING_PORT:-8080}"
|
||||||
GUNICORN_NUM_PROCESS="${CLEARML_SERVING_NUM_PROCESS:-4}"
|
GUNICORN_NUM_PROCESS="${CLEARML_SERVING_NUM_PROCESS:-4}"
|
||||||
GUNICORN_SERVING_TIMEOUT="${GUNICORN_SERVING_TIMEOUT:-600}"
|
GUNICORN_SERVING_TIMEOUT="${GUNICORN_SERVING_TIMEOUT:-600}"
|
||||||
|
GUNICORN_MAX_REQUESTS="${GUNICORN_MAX_REQUESTS:-0}"
|
||||||
UVICORN_SERVE_LOOP="${UVICORN_SERVE_LOOP:-asyncio}"
|
UVICORN_SERVE_LOOP="${UVICORN_SERVE_LOOP:-asyncio}"
|
||||||
|
UVICORN_LOG_LEVEL="${UVICORN_LOG_LEVEL:-warning}"
|
||||||
|
|
||||||
# set default internal serve endpoint (for request pipelining)
|
# set default internal serve endpoint (for request pipelining)
|
||||||
CLEARML_DEFAULT_BASE_SERVE_URL="${CLEARML_DEFAULT_BASE_SERVE_URL:-http://127.0.0.1:$SERVING_PORT/serve}"
|
CLEARML_DEFAULT_BASE_SERVE_URL="${CLEARML_DEFAULT_BASE_SERVE_URL:-http://127.0.0.1:$SERVING_PORT/serve}"
|
||||||
@ -24,9 +25,11 @@ echo WEB_CONCURRENCY="$WEB_CONCURRENCY"
|
|||||||
echo SERVING_PORT="$SERVING_PORT"
|
echo SERVING_PORT="$SERVING_PORT"
|
||||||
echo GUNICORN_NUM_PROCESS="$GUNICORN_NUM_PROCESS"
|
echo GUNICORN_NUM_PROCESS="$GUNICORN_NUM_PROCESS"
|
||||||
echo GUNICORN_SERVING_TIMEOUT="$GUNICORN_SERVING_PORT"
|
echo GUNICORN_SERVING_TIMEOUT="$GUNICORN_SERVING_PORT"
|
||||||
|
echo GUNICORN_MAX_REQUESTS="$GUNICORN_MAX_REQUESTS"
|
||||||
echo GUNICORN_EXTRA_ARGS="$GUNICORN_EXTRA_ARGS"
|
echo GUNICORN_EXTRA_ARGS="$GUNICORN_EXTRA_ARGS"
|
||||||
echo UVICORN_SERVE_LOOP="$UVICORN_SERVE_LOOP"
|
echo UVICORN_SERVE_LOOP="$UVICORN_SERVE_LOOP"
|
||||||
echo UVICORN_EXTRA_ARGS="$UVICORN_EXTRA_ARGS"
|
echo UVICORN_EXTRA_ARGS="$UVICORN_EXTRA_ARGS"
|
||||||
|
echo UVICORN_LOG_LEVEL="$UVICORN_LOG_LEVEL"
|
||||||
echo CLEARML_DEFAULT_BASE_SERVE_URL="$CLEARML_DEFAULT_BASE_SERVE_URL"
|
echo CLEARML_DEFAULT_BASE_SERVE_URL="$CLEARML_DEFAULT_BASE_SERVE_URL"
|
||||||
echo CLEARML_DEFAULT_TRITON_GRPC_ADDR="$CLEARML_DEFAULT_TRITON_GRPC_ADDR"
|
echo CLEARML_DEFAULT_TRITON_GRPC_ADDR="$CLEARML_DEFAULT_TRITON_GRPC_ADDR"
|
||||||
|
|
||||||
@ -40,7 +43,7 @@ if [ -z "$CLEARML_USE_GUNICORN" ]
|
|||||||
then
|
then
|
||||||
echo "Starting Uvicorn server"
|
echo "Starting Uvicorn server"
|
||||||
PYTHONPATH=$(pwd) python3 -m uvicorn \
|
PYTHONPATH=$(pwd) python3 -m uvicorn \
|
||||||
clearml_serving.serving.main:app --host 0.0.0.0 --port $SERVING_PORT --loop $UVICORN_SERVE_LOOP \
|
clearml_serving.serving.main:app --log-level $UVICORN_LOG_LEVEL --host 0.0.0.0 --port $SERVING_PORT --loop $UVICORN_SERVE_LOOP \
|
||||||
$UVICORN_EXTRA_ARGS
|
$UVICORN_EXTRA_ARGS
|
||||||
else
|
else
|
||||||
echo "Starting Gunicorn server"
|
echo "Starting Gunicorn server"
|
||||||
@ -49,6 +52,7 @@ else
|
|||||||
--preload clearml_serving.serving.main:app \
|
--preload clearml_serving.serving.main:app \
|
||||||
--workers $GUNICORN_NUM_PROCESS \
|
--workers $GUNICORN_NUM_PROCESS \
|
||||||
--worker-class uvicorn.workers.UvicornWorker \
|
--worker-class uvicorn.workers.UvicornWorker \
|
||||||
|
--max-requests $GUNICORN_MAX_REQUESTS \
|
||||||
--timeout $GUNICORN_SERVING_TIMEOUT \
|
--timeout $GUNICORN_SERVING_TIMEOUT \
|
||||||
--bind 0.0.0.0:$SERVING_PORT \
|
--bind 0.0.0.0:$SERVING_PORT \
|
||||||
$GUNICORN_EXTRA_ARGS
|
$GUNICORN_EXTRA_ARGS
|
||||||
|
Loading…
Reference in New Issue
Block a user