llm, add a finish for open-webui, fix config.yaml for Continue, possibly fix pull-models causing terminals to close when cancelled.

This commit is contained in:
me
2026-10-10 11:12:25 -07:00
parent 7922225b26
commit 53351fde28
+34 -14
View File
@@ -325,7 +325,7 @@
owner: "{{ user }}"
mode: "0755"
- name: Workstation | Linux | Software | LLMs | runit | open-webui | Script | File
- name: Workstation | Linux | Software | LLMs | runit | open-webui | Script | Run
ansible.builtin.copy:
dest: /etc/sv/open-webui/run
content: |
@@ -358,6 +358,25 @@
ghcr.io/open-webui/open-webui:main
mode: "0755"
- name: Workstation | Linux | Software | LLMs | runit | open-webui | Script | Finish
ansible.builtin.copy:
dest: /etc/sv/open-webui/finish
content: |
#!/bin/sh
exec 2>&1
# $1 is the exit code, $2 is the exit status byte (signal number if killed)
echo "Service finished with exit code: $1 and status: $2"
echo "Stopping..."
docker stop open-webui &&
echo "Container stopped" ||
echo "Container already stopped."
echo "Deleting..."
docker rm -f open-webui &&
echo "Container deleted" ||
echo "Container already deleted."
mode: "0755"
- name: Workstation | Linux | Software | LLMs | runit | open-webui | Script | Log
ansible.builtin.copy:
dest: /etc/sv/open-webui/log/run
@@ -459,11 +478,11 @@
{% for llm in llm_installs %}
echo -e "\n\n Starting {{ llm.model }} \n\n"
ollama pull {{ llm.model }} || {
status=$?
echo "ERROR: Pull failed with status $status, exiting."
ollama pull {{ llm.model }} ||
status=$? &&
echo "ERROR: Pull failed with status $status, exiting." &&
return $status
}
{% endfor %}
echo "Done!!"
}
@@ -574,20 +593,21 @@
models:
{% for llm in llm_installs %}
{% if llm.model in llm_models.stdout %}
- name: {{ llm.provider }}
provider: ollama
model: {{ llm.model }}
defaultCompletionOptions:
contextLength: {{ llm_context }}
maxTokens: {{ llm_context }}
- name: {{ llm.provider }}-auto
provider: ollama
model: {{ llm.model }}
defaultCompletionOptions:
contextLength: {{ llm_context }}
maxTokens: {{ llm_context }}
roles:
- autocomplete
maxTokens: {{ llm_context / 4 }}
#- name: {{ llm.provider }}_autocomplete
# provider: ollama
# model: {{ llm.model }}
# defaultCompletionOptions:
# contextLength: {{ llm_context }}
# maxTokens: {{ llm_context }}
# roles:
# - autocomplete
{% endif %}
{% endfor %}
mode: "0644"