Merge pull request #505 from SamuelBortolinAfliant/allowed-to-set-the-uvicorn-loop
Some checks failed
Create and publish Docker images with specific build args / build-main-image (push) Has been cancelled
Create and publish Docker images with specific build args / build-cuda-image (push) Has been cancelled
Create and publish Docker images with specific build args / build-minimum-image (push) Has been cancelled
Create and publish Docker images with specific build args / merge-main-images (push) Has been cancelled
Create and publish Docker images with specific build args / merge-cuda-images (push) Has been cancelled
Create and publish Docker images with specific build args / merge-minimum-images (push) Has been cancelled

Allowed to set the UVICORN_LOOP env var to configure the uvicorn loop parameter
This commit is contained in:
Tim Jaeryang Baek
2025-04-18 18:08:55 -07:00
committed by GitHub

View File

@@ -4,6 +4,8 @@ HOST="${HOST:-0.0.0.0}"
# Default value for PIPELINES_DIR
PIPELINES_DIR=${PIPELINES_DIR:-./pipelines}
UVICORN_LOOP="${UVICORN_LOOP:-auto}"
# Function to reset pipelines
reset_pipelines_dir() {
if [ "$RESET_PIPELINES_DIR" = true ]; then
@@ -150,6 +152,6 @@ fi
if [[ "$MODE" == "run" || "$MODE" == "full" ]]; then
echo "Running via Mode: $MODE"
uvicorn main:app --host "$HOST" --port "$PORT" --forwarded-allow-ips '*'
uvicorn main:app --host "$HOST" --port "$PORT" --forwarded-allow-ips '*' --loop "$UVICORN_LOOP"
fi