Compare commits
3 commits
8de98519ec
...
04d9cc5eed
| Author | SHA1 | Date | |
|---|---|---|---|
| 04d9cc5eed | |||
| 8d131ea8be | |||
| 02a366a782 |
3 changed files with 16 additions and 1 deletions
|
|
@ -5,8 +5,9 @@ Description=A local LLM server
|
|||
# keep-sorted start
|
||||
ContainerName=ollama
|
||||
Image=docker.io/ollama/ollama:latest
|
||||
Network=ollama.network
|
||||
PublishPort=11434:11434
|
||||
Volume=%h/.local/share/ollama:/root/.ollama:Z
|
||||
Volume=%h/.local/share/ollama:/root/.ollama:ro,z
|
||||
# keep-sorted end
|
||||
|
||||
[Install]
|
||||
|
|
|
|||
5
.config/containers/systemd/ollama.network
Normal file
5
.config/containers/systemd/ollama.network
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
[Unit]
|
||||
Description=Isolated network for my local LLM server
|
||||
|
||||
[Network]
|
||||
Internal=true
|
||||
9
.local/bin/llm-import-model
Executable file
9
.local/bin/llm-import-model
Executable file
|
|
@ -0,0 +1,9 @@
|
|||
#! /usr/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
IFS=$'\n\t'
|
||||
|
||||
mkdir --parents ~/.local/share/ollama/
|
||||
pod_id=$(podman run --detach --rm --volume ~/.local/share/ollama/:/root/.ollama ollama:latest)
|
||||
podman exec --interactive --tty "${pod_id}" ollama pull "${1}"
|
||||
podman kill "${pod_id}"
|
||||
Loading…
Add table
Add a link
Reference in a new issue