forked from chatchat-space/Langchain-Chatchat
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
36 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#! /bin/bash | ||
# 检查是否提供了至少一个参数 | ||
do_cmd(){ | ||
echo $@ | ||
$@ | ||
[[ $? -ne 0 ]] && echo "do_cmd failed" && exit 1 | ||
} | ||
if [ "$#" -lt 1 ]; then | ||
echo "Usage: $0 <requirements.txt>" | ||
exit 1 | ||
fi | ||
|
||
# 遍历所有提供的参数 | ||
for arg in "$@"; do | ||
# 检查参数是否以.txt结尾 | ||
if [[ $arg == *.txt ]]; then | ||
# 如果是,运行pip install -r | ||
|
||
#prgs="$(cat $arg|grep -vE '^$|^#|#$'|sed 's/\([^=<>!~^~]*\)[=<>].*$/\1/g'| awk -F'==' '{print $1}')" | ||
prgs="$(cat $arg|sed 's/\([^=<>!~^~]*\)[=<>].*$/\1/g'|grep -vE '^$|^#|#$')" | ||
prgs="${prgs//$'\n'/ }" | ||
prgs="${prgs//#/}" | ||
echo "prgs=$prgs" | ||
[[ -z "$prgs" ]] && echo "nothing to install for $arg" && continue | ||
do_cmd pip install $prgs | ||
else | ||
echo "Warning: '$arg' does not end with .txt. Skipping..." | ||
fi | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
llama_index |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
chardet | ||
sentencepiece |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
. ~/jvenv311/bin/activate | ||
python startup.py -a | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters