First Commit
This commit is contained in:
22
usr/lib/systemd/system/ollama.service
Normal file
22
usr/lib/systemd/system/ollama.service
Normal file
@@ -0,0 +1,22 @@
|
||||
[Unit]
|
||||
Description=Ollama Service
|
||||
Wants=network-online.target
|
||||
After=network.target network-online.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/ollama serve
|
||||
WorkingDirectory=/var/lib/ollama
|
||||
Environment="HOME=/var/lib/ollama"
|
||||
Environment="OLLAMA_MODELS=/var/lib/ollama"
|
||||
User=ollama
|
||||
Group=ollama
|
||||
Restart=on-failure
|
||||
RestartSec=3
|
||||
RestartPreventExitStatus=1
|
||||
Type=simple
|
||||
PrivateTmp=yes
|
||||
ProtectSystem=full
|
||||
ProtectHome=yes
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
2
usr/lib/sysusers.d/ollama.conf
Normal file
2
usr/lib/sysusers.d/ollama.conf
Normal file
@@ -0,0 +1,2 @@
|
||||
g ollama - -
|
||||
u! ollama - "ollama user" /var/lib/ollama
|
||||
1
usr/lib/tmpfiles.d/ollama.conf
Normal file
1
usr/lib/tmpfiles.d/ollama.conf
Normal file
@@ -0,0 +1 @@
|
||||
Q /var/lib/ollama 0755 ollama ollama
|
||||
Reference in New Issue
Block a user