-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstart_local.sh
executable file
·41 lines (34 loc) · 1011 Bytes
/
start_local.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
#!/bin/bash
# poetry install
# killall ollama
# killall streamlit
# Define a file to store the PIDs
PID_FILE="processes.pid"
# Start processes and save their PIDs
cd ollama || exit
./get_ollama.sh &
echo $! > $PID_FILE
# Fetch configuration from ../backend/config.json
config_file="../backend/config.json"
structured_query=$(jq -r '.structured_query' $config_file)
if [ "$structured_query" == true ]; then
cd ../structured_query || exit
uvicorn llm_service_structured_query:app --host 0.0.0.0 --port 8081 &
echo $! > $PID_FILE
else
cd ../llm_service || exit
uvicorn llm_service:app --host 0.0.0.0 --port 8081 &
echo $! > $PID_FILE
fi
cd ../documentation_bot || exit
uvicorn documentation_query:app --host 0.0.0.0 --port 8083 &
echo $! >> $PID_FILE
cd ../backend || exit
uvicorn backend:app --host 0.0.0.0 --port 8000 &
echo $! >> $PID_FILE
cd ../frontend || exit
streamlit run ui.py &
echo $! >> $PID_FILE
cd ..
# Keep the script running to maintain the background processes
wait