Keep the models in a persistent volume
This commit is contained in:
parent
bd5cfa7a65
commit
8a29d8da40
1 changed files with 6 additions and 0 deletions
|
|
@ -2,12 +2,18 @@
|
||||||
Description=A local LLM server
|
Description=A local LLM server
|
||||||
|
|
||||||
[Container]
|
[Container]
|
||||||
|
# keep-sorted start
|
||||||
ContainerName=ollama
|
ContainerName=ollama
|
||||||
Image=docker.io/ollama/ollama:latest
|
Image=docker.io/ollama/ollama:latest
|
||||||
PublishPort=11434:11434
|
PublishPort=11434:11434
|
||||||
|
Volume=%h/.local/share/ollama:/root/.ollama:Z
|
||||||
|
# keep-sorted end
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
|
# keep-sorted start
|
||||||
|
ExecStartPre=mkdir -p %h/.local/share/ollama
|
||||||
Restart=always
|
Restart=always
|
||||||
|
# keep-sorted end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue