mirror of
https://github.com/open-webui/pipelines
synced 2025-06-26 18:15:58 +00:00
Update start.sh
This commit is contained in:
parent
604ea52883
commit
f48f3ae276
18
start.sh
18
start.sh
@ -2,4 +2,22 @@
|
|||||||
PORT="${PORT:-9099}"
|
PORT="${PORT:-9099}"
|
||||||
HOST="${HOST:-0.0.0.0}"
|
HOST="${HOST:-0.0.0.0}"
|
||||||
|
|
||||||
|
# Function to install requirements if requirements.txt is provided
|
||||||
|
install_requirements() {
|
||||||
|
if [[ -f "$1" ]]; then
|
||||||
|
echo "requirements.txt found at $1. Installing dependencies..."
|
||||||
|
pip install -r "$1"
|
||||||
|
else
|
||||||
|
echo "requirements.txt not found at $1. Skipping installation of dependencies."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Check if the PIPELINES_REQUIREMENTS_PATH environment variable is set and non-empty
|
||||||
|
if [[ -n "$PIPELINES_REQUIREMENTS_PATH" ]]; then
|
||||||
|
# Install dependencies from the specified requirements.txt
|
||||||
|
install_requirements "$PIPELINES_REQUIREMENTS_PATH"
|
||||||
|
else
|
||||||
|
echo "PIPELINES_REQUIREMENTS_PATH not specified. Skipping installation of dependencies."
|
||||||
|
fi
|
||||||
|
|
||||||
uvicorn main:app --host "$HOST" --port "$PORT" --forwarded-allow-ips '*'
|
uvicorn main:app --host "$HOST" --port "$PORT" --forwarded-allow-ips '*'
|
||||||
|
Loading…
Reference in New Issue
Block a user