Skip to content

Commit

Permalink
Merge pull request ollama#606 from jmorganca/mxyng/install.sh-2
Browse files Browse the repository at this point in the history
ordered list of install locations
  • Loading branch information
mxyng authored Sep 29, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
2 parents cdfeb16 + 29c056e commit c0b1bf7
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions scripts/install.sh
Original file line number Diff line number Diff line change
@@ -54,9 +54,13 @@ fi
status "Downloading ollama..."
curl --fail --show-error --location --progress-bar -o $TEMP_DIR/ollama "https://ollama.ai/download/ollama-linux-$ARCH"

status "Installing ollama to /usr/bin..."
$SUDO install -o0 -g0 -m755 -d /usr/bin
$SUDO install -o0 -g0 -m755 $TEMP_DIR/ollama /usr/bin/ollama
for BINDIR in /usr/local/bin /usr/bin /bin; do
echo $PATH | grep -q $BINDIR && break || continue
done

status "Installing ollama to $BINDIR..."
$SUDO install -o0 -g0 -m755 -d $BINDIR
$SUDO install -o0 -g0 -m755 $TEMP_DIR/ollama $BINDIR/ollama

install_success() { status 'Install complete. Run "ollama" from the command line.'; }
trap install_success EXIT
@@ -76,7 +80,7 @@ Description=Ollama Service
After=network-online.target
[Service]
ExecStart=/usr/bin/ollama serve
ExecStart=$BINDIR/ollama serve
User=ollama
Group=ollama
Restart=always

0 comments on commit c0b1bf7

Please sign in to comment.