From ba9a6fe80e094cd4350ea096c74cf4e61fa2da70 Mon Sep 17 00:00:00 2001 From: Nicholas Schwab Date: Mon, 5 Aug 2024 20:03:39 +0200 Subject: [PATCH] Create systemd socket file in install script. --- scripts/install.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/scripts/install.sh b/scripts/install.sh index aa8b3e5e..d5ebeeba 100644 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -116,6 +116,16 @@ Environment="PATH=$PATH" [Install] WantedBy=default.target EOF + + status "Creating ollama systemd socket..." + cat </dev/null +[Unit] +Description=Ollama Socket + +[Socket] +ListenStream=11434 +EOF + SYSTEMCTL_RUNNING="$(systemctl is-system-running || true)" case $SYSTEMCTL_RUNNING in running|degraded) @@ -205,7 +215,7 @@ CUDA_REPO_ERR_MSG="NVIDIA GPU detected, but your OS and Architecture are not sup # ref: https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#fedora install_cuda_driver_yum() { status 'Installing NVIDIA repository...' - + case $PACKAGE_MANAGER in yum) $SUDO $PACKAGE_MANAGER -y install yum-utils