summarylogtreecommitdiffstats
path: root/litellm-ollama@.service
blob: 04b81eedca2a3f1c0a201e25af681cfec2a52957 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
[Unit]
Description=LiteLLM Ollama model server

[Service]
Type=simple
User=litellm-ollama
Group=litellm-ollama

EnvironmentFile=/etc/litellm-ollama/litellm-ollama.argconf
ExecStart=/usr/bin/litellm --model ollama/%i --api_base http://localhost:11434 $HOST $PORT $TELEMETRY $TEMPERATURE $MAX_TOKENS
Restart=on-failure
RestartSec=30s

WorkingDirectory=~
StateDirectory=litellm-ollama

ProtectSystem=strict
PrivateTmp=yes
ProtectHome=yes
ProtectKernelTunables=yes
NoNewPrivileges=yes
SystemCallArchitectures=native
MemoryDenyWriteExecute=true
# PrivateDevices=yes will stop ollama-cuda (or rocm, if available) from working correctly. Override this if necessary.
PrivateDevices=yes
ProtectControlGroups=true
RestrictSUIDSGID=true
RestrictRealtime=true
LockPersonality=true
ProtectKernelLogs=true
ProtectHostname=true
ProtectKernelModules=true
PrivateUsers=true
ProtectClock=true
SystemCallErrorNumber=EPERM
SystemCallFilter=@system-service

[Install]
WantedBy=multi-user.target