Created
July 26, 2024 12:41
-
-
Save bebyx/8cecd83a2d7c94a8f7c6352298db7c9e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
curl -L https://ollama.com/download/ollama-linux-amd64 -o $HOME/.local/bin/ollama | |
chmod +x $HOME/.local/bin/ollama | |
cat <<EOF > ~/.config/systemd/user/ollama.service | |
[Unit] | |
Description=Ollama Service | |
After=network-online.target | |
[Service] | |
ExecStart=$HOME/.local/bin/ollama serve | |
Restart=always | |
RestartSec=3 | |
[Install] | |
WantedBy=default.target | |
EOF | |
systemctl --user daemon-reload | |
systemctl --user restart ollama |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment