mirror of
https://github.com/open-webui/pipelines
synced 2025-05-10 15:40:55 +00:00
fix: start.sh
This commit is contained in:
parent
8edfc45c64
commit
2e205b9eb0
6
start.sh
6
start.sh
@ -61,9 +61,11 @@ install_frontmatter_requirements() {
|
||||
frontmatter=$(sed -n '/^---$/,/^---$/p' "$file")
|
||||
|
||||
if echo "$frontmatter" | grep -q "requirements:"; then
|
||||
requirements=$(echo "$frontmatter" | grep "requirements:" | cut -d ":" -f2- | tr -d ' ')
|
||||
# Extract lines starting from "requirements:" to the end of the block or until another top-level key is found
|
||||
requirements=$(echo "$frontmatter" | sed -n '/^requirements:/,/^[a-zA-Z\-]*:/p' | sed -e '1d' -e '$d' | tr -d ',\n')
|
||||
requirements=$(echo "$requirements" | awk '{$1=$1};1')
|
||||
echo "Installing requirements: $requirements"
|
||||
pip install $(echo $requirements | tr ',' ' ')
|
||||
pip install $requirements
|
||||
else
|
||||
echo "No requirements found in frontmatter of $file."
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user