Skip to content

Commit e7a3b21

Browse files
committed
Update ollama-install.sh
1 parent 7660631 commit e7a3b21

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

install/ollama-install.sh

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ update_os
1515

1616
msg_info "Installing Dependencies"
1717
$STD apt-get install -y \
18-
build-essential \
19-
pkg-config
18+
build-essential \
19+
pkg-config
2020
msg_ok "Installed Dependencies"
2121

2222
msg_info "Setting up Intel® Repositories"
@@ -31,11 +31,11 @@ msg_ok "Set up Intel® Repositories"
3131
msg_info "Setting Up Hardware Acceleration"
3232
$STD apt-get -y install {va-driver-all,ocl-icd-libopencl1,intel-opencl-icd,vainfo,intel-gpu-tools,intel-level-zero-gpu,level-zero,level-zero-dev}
3333
if [[ "$CTTYPE" == "0" ]]; then
34-
chgrp video /dev/dri
35-
chmod 755 /dev/dri
36-
chmod 660 /dev/dri/*
37-
$STD adduser $(id -u -n) video
38-
$STD adduser $(id -u -n) render
34+
chgrp video /dev/dri
35+
chmod 755 /dev/dri
36+
chmod 660 /dev/dri/*
37+
$STD adduser $(id -u -n) video
38+
$STD adduser $(id -u -n) render
3939
fi
4040
msg_ok "Set Up Hardware Acceleration"
4141

@@ -52,22 +52,22 @@ OLLAMA_URL="https://github.com/ollama/ollama/releases/download/${RELEASE}/ollama
5252
TMP_TAR="/tmp/ollama.tgz"
5353
echo -e "\n"
5454
if curl -fL# -o "$TMP_TAR" "$OLLAMA_URL"; then
55-
if tar -xzf "$TMP_TAR" -C "$OLLAMA_INSTALL_DIR"; then
56-
ln -sf "$OLLAMA_INSTALL_DIR/bin/ollama" "$BINDIR/ollama"
57-
echo "${RELEASE}" >/opt/Ollama_version.txt
58-
msg_ok "Installed Ollama ${RELEASE}"
59-
else
60-
msg_error "Extraction failed – archive corrupt or incomplete"
61-
exit 1
62-
fi
63-
else
64-
msg_error "Download failed – $OLLAMA_URL not reachable"
55+
if tar -xzf "$TMP_TAR" -C "$OLLAMA_INSTALL_DIR"; then
56+
ln -sf "$OLLAMA_INSTALL_DIR/bin/ollama" "$BINDIR/ollama"
57+
echo "${RELEASE}" >/opt/Ollama_version.txt
58+
msg_ok "Installed Ollama ${RELEASE}"
59+
else
60+
msg_error "Extraction failed – archive corrupt or incomplete"
6561
exit 1
62+
fi
63+
else
64+
msg_error "Download failed – $OLLAMA_URL not reachable"
65+
exit 1
6666
fi
6767

6868
msg_info "Creating ollama User and Group"
6969
if ! id ollama >/dev/null 2>&1; then
70-
useradd -r -s /usr/sbin/nologin -U -m -d /usr/share/ollama ollama
70+
useradd -r -s /usr/sbin/nologin -U -m -d /usr/share/ollama ollama
7171
fi
7272
$STD usermod -aG render ollama || true
7373
$STD usermod -aG video ollama || true

0 commit comments

Comments
 (0)