-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun1.sh
More file actions
executable file
·50 lines (39 loc) · 1.32 KB
/
Copy pathrun1.sh
File metadata and controls
executable file
·50 lines (39 loc) · 1.32 KB
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
# #!/bin/bash
# # Define paths
# WORK_DIR=""
# VENV_PATH=""
# # Function to activate virtual environment and install requests
# install_requirements() {
# echo "Activating virtual environment and installing requests..."
# source "$VENV_PATH"
# pip install requests
# }
# # Start Ollama server in a new terminal window
# start_ollama() {
# echo "Starting Ollama server in a new terminal..."
# osascript -e 'tell application "Terminal" to do script "cd \"'$WORK_DIR'\" && ollama serve"'
# }
# # Start the Python script in a new terminal window
# start_python() {
# echo "Running LocalLLMQuery.py in a new terminal..."
# osascript -e 'tell application "Terminal" to do script "cd \"'$WORK_DIR'\" && source deepseek-env/bin/activate && python3 LocalLLMQuery.py"'
# }
# # Kill Ollama services after Python script completes
# kill_ollama() {
# echo "Killing Ollama services..."
# pkill -9 ollama
# }
# # Main execution
# install_requirements
# start_ollama
# start_python
# # Wait for the Python program to finish and then stop Ollama services
# wait
# kill_ollama
#!/bin/bash
# Navigate to the directory where Ollama is installed or where you want to run the server
# (Modify this line with the correct path if needed)
cd /path/to/ollama
# Start the Ollama server
echo "Starting Ollama server..."
ollama serve