Using Ollama
% ollama list
NAME ID SIZE MODIFIED
deepseek-coder:6.7b ce298d984115 3.8 GB 14 hours ago
mistral:7b f974a74358d6 4.1 GB 15 hours ago
ollama remove model
It’s a great tool to use. There are some bugs in Ollamac. For example, when it receives a response from the local API, several text boxes in the app update.
However, in Linux, Ollama runs as a system service. Here is the service configuration file:
/etc/systemd/system/ollama.service
:
[Unit]
Description=Ollama Service
After=network-online.target
[Service]
ExecStart=/usr/local/bin/ollama serve
User=ollama
Group=ollama
Restart=always
RestartSec=3
Environment="PATH=/home/lzw/.local/bin:/home/lzw/bin:/usr/local/cuda-12.2/bin:/home/lzw/.local/share/gem/ruby/3.0.0/bin:/home/lzw/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin"
[Install]
WantedBy=default.target
Use the following commands to control the Ollama service:
sudo systemctl stop ollama.service
sudo systemctl disable ollama.service
sudo systemctl status ollama.service