Commit 386f0e62 authored by Vladimir Bashkirtsev's avatar Vladimir Bashkirtsev

Initial commit

parents
all: ollama-service
dd if=/dev/zero of=swap bs=1048576 count=1024
chmod 600 swap
mkswap swap
swapon swap
mkdir tmp
mount --bind tmp /tmp
tar xf ollama-0.11.4.tar.gz
cd ollama-0.11.4 && cmake -B build
cd ollama-0.11.4 && cmake --build build
cd ollama-0.11.4 && GO111MODULE=on GOCACHE=/tmp/gocache GOPATH=$(CURDIR)/../go/go $(CURDIR)/../go/go/bin/go mod download
cd ollama-0.11.4 && GO111MODULE=on GOCACHE=/tmp/gocache GOPATH=$(CURDIR)/../go/go $(CURDIR)/../go/go/bin/go build -trimpath -buildmode=pie -o /usr/bin/ollama .
@echo "$$OLLAMA_SERVICE" > /lib/systemd/system/ollama.service
systemctl enable ollama.service
rm -rf ollama-0.11.4
umount /tmp
rm -rf tmp
swapoff swap
rm -rf swap
ollama-service:
define OLLAMA_SERVICE
[Unit]
Description=Ollama server
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=root
Group=root
ExecStart=/usr/bin/ollama
Restart=on-failure
[Install]
WantedBy=multi-user.target
endef
export OLLAMA_SERVICE
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment