Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix setup without Ollama 🐛 #30

Merged
merged 1 commit into from
Jun 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions script/ollama/setup
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/bin/bash -e

if command -v ollama &> /dev/null; then
echo "ollama is already installed"
if [ "$OLLAMA_URL" != "http://localhost:11434" ]; then
echo "OLLAMA_URL is not localhost"
exit 0
fi

if [ -z "$OLLAMA_URL" ]; then
echo "OLLAMA_URL is already set"
if command -v ollama &> /dev/null; then
echo "ollama is already installed"
exit 0
fi

Expand Down
12 changes: 12 additions & 0 deletions script/ollama/start
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash -e

if [ "$OLLAMA_URL" != "http://localhost:11434" ]; then
echo "OLLAMA_URL is not localhost"
exit 0
fi

source ./script/concerns/loader

start_loader "Starting Ollama"
sudo systemctl start ollama.service &>> ./log/production.log
stop_loader
6 changes: 3 additions & 3 deletions script/production/start
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

source ./script/concerns/loader

start_loader "Starting Ollama"
sudo systemctl start ollama.service &>> ./log/production.log
stop_loader
if [ "$OLLAMA_URL" == "http://localhost:11434" ]; then
./script/ollama/start
fi

start_loader "Starting Nosia"
source .env
Expand Down