-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathquickstart.sh
55 lines (45 loc) · 1.18 KB
/
quickstart.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/bin/bash
# Function to display usage information
usage() {
echo "Usage: $0 -m|--model-path <model_path> -t|--task <task>"
exit 1
}
# Parse arguments
while [[ $# -gt 0 ]]; do
key="$1"
case $key in
-m|--model-path)
model_path="$2"
shift # past argument
shift # past value
;;
-t|--task)
task="$2"
shift # past argument
shift # past value
;;
*) # unknown option
usage
;;
esac
done
# Check if required arguments are provided
if [ -z "$model_path" ] || [ -z "$task" ]; then
echo "Error: Missing required arguments."
usage
fi
# Install dependencies
pip install --upgrade pip
pip install -r requirements.txt
# Add sys path
src_path="$(pwd)/src"
export PYTHONPATH="$PYTHONPATH:$src_path"
# Run model download script
python -m src.generation.model_download --model_path "$model_path"
wget https://raw.githubusercontent.com/milvus-io/milvus/master/scripts/standalone_embed.sh
bash standalone_embed.sh start
sudo docker ps -a
# Run embedding script
python -m src.embedding.milvus_database
# Run prompt construction script
python -m src.prompt.prompt_construction "$task"