たんなるメモ
$ docker pull ollama/ollama
$ mkdir work
$ cd work
$ wget https://huggingface.co/elyza/Llama-3-ELYZA-JP-8B-GGUF/resolve/main/Llama-3-ELYZA-JP-8B-q4_k_m.gguf
$ cat << EOF > Modelfile
FROM ./Llama-3-ELYZA-JP-8B-q4_k_m.gguf
TEMPLATE """{{ if .System }}<|start_header_id|>system<|end_header_id|>
{{ .System }}<|eot_id|>{{ end }}{{ if .Prompt }}<|start_header_id|>user<|end_header_id|>
{{ .Prompt }}<|eot_id|>{{ end }}<|start_header_id|>assistant<|end_header_id|>
{{ .Response }}<|eot_id|>"""
PARAMETER stop "<|start_header_id|>"
PARAMETER stop "<|end_header_id|>"
PARAMETER stop "<|eot_id|>"
PARAMETER stop "<|reserved_special_token"
EOF
$ cd ../
$ docker run -d -v $(pwd)/ollama:/root/.ollama -v $(pwd)/work:/root/work -p 11434:11434 --name ollama ollama/ollama
$ docker exec -it ollama ollama create elyza:jp8b -f /root/work/Modelfile
$ docker exec -it ollama ollama run elyza:jp8b
$ docker stop ollama && docker rm ollama