Compare commits
4
Commits
9dee72820b
...
b3a11dec30
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b3a11dec30 | ||
|
|
e8cece4445 | ||
|
|
0e10bc235f | ||
|
|
883ad223c2 |
No files matched your search
@@ -335,14 +335,14 @@ bindsym $shift+$mod+l exec "i3lock -c 000000 -e -f && sleep 1 && xset dpms force
|
|||||||
|
|
||||||
# shutdown entire system.
|
# shutdown entire system.
|
||||||
#bindsym $ctrl+$shift+q exec dbus-send --system --print-reply --dest="org.freedesktop.ConsoleKit" /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Stop
|
#bindsym $ctrl+$shift+q exec dbus-send --system --print-reply --dest="org.freedesktop.ConsoleKit" /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Stop
|
||||||
bindsym $ctrl+$alt+q exec sudo shutdown -h now
|
bindsym $ctrl+$alt+$mod+q exec sudo shutdown -h now
|
||||||
bindsym $shift+$alt+q exec sudo shutdown -h now
|
bindsym $shift+$alt+$mod+q exec sudo shutdown -h now
|
||||||
bindsym $shift+$ctrl+q exec sudo shutdown -h now
|
bindsym $shift+$ctrl+$mod+q exec sudo shutdown -h now
|
||||||
|
|
||||||
# restart entire system.
|
# restart entire system.
|
||||||
bindsym $ctrl+$alt+r exec sudo shutdown -r now
|
bindsym $ctrl+$alt+$mod+r exec sudo shutdown -r now
|
||||||
bindsym $shift+$alt+r exec sudo shutdown -r now
|
bindsym $shift+$alt+$mod+r exec sudo shutdown -r now
|
||||||
bindsym $shift+$ctrl+r exec sudo shutdown -r now
|
bindsym $shift+$ctrl+$mod+r exec sudo shutdown -r now
|
||||||
|
|
||||||
# restart LLM programs
|
# restart LLM programs
|
||||||
set $RESTART_LLMS "sudo sv restart ollama; sudo sv restart zeroclaw; sudo sv restart open-webui"
|
set $RESTART_LLMS "sudo sv restart ollama; sudo sv restart zeroclaw; sudo sv restart open-webui"
|
||||||
|
|||||||
@@ -289,36 +289,59 @@
|
|||||||
;
|
;
|
||||||
; ollama (default=true)
|
; ollama (default=true)
|
||||||
; Install and enable the ollama LLM manager.
|
; Install and enable the ollama LLM manager.
|
||||||
|
; API: http://127.0.0.1:11434
|
||||||
;
|
;
|
||||||
; manage_models (default=true)
|
; manage_models (default=true)
|
||||||
; Automatically choose and pull the models to use based on system
|
; Automatically choose and pull the models to use based on system
|
||||||
; resources. Otherwise leaves images alone but still handles config.
|
; resources. Otherwise leaves images alone but still handles config.
|
||||||
;
|
;
|
||||||
|
; hf_token (default=false)
|
||||||
|
; Token from Hugging Face which allows faster download speeds than anon.
|
||||||
|
; May help with ollama and also supposed to help with open-webui. Token
|
||||||
|
; needs set to something like hf_kjBCCLABEEABUVAKbjadbvkaksvBAVKBkjsDVK.
|
||||||
|
;
|
||||||
|
;
|
||||||
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
state: present
|
||||||
|
create: true
|
||||||
|
backup: true
|
||||||
|
mode: "0644"
|
||||||
|
|
||||||
|
- name: General | Account Management | Provisioning Configuration | Workstation | Create | LLMs | GUIs
|
||||||
|
ansible.builtin.blockinfile:
|
||||||
|
path: "{{ wrk_file }}"
|
||||||
|
marker: '; {mark} MANAGED BY ANSIBLE | Workstation Config | LLMs | GUIs'
|
||||||
|
block: |
|
||||||
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; LLMs: GUIs ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
;
|
||||||
; zero (default=true)
|
; zero (default=true)
|
||||||
; Install and enable the Zeroclaw web daemon, a minimalistic interface
|
; Install and enable the Zeroclaw web daemon, a minimalistic interface
|
||||||
; for many models and providers with negligible resource usage. Also
|
; for many models and providers with negligible resource usage. Also
|
||||||
; installs the CLI tool zerocode as an alternative to the web GUI.
|
; installs the CLI tool zerocode as an alternative to the web GUI.
|
||||||
|
; URL: http://127.0.0.1:42617
|
||||||
;
|
;
|
||||||
; open_webui (default=false)
|
; open_webui (default=false)
|
||||||
; Install and enable open-webui as a Docker container. Very polished web
|
; Install and enable open-webui as a Docker container. Very polished web
|
||||||
; frontend for ollama and also handles other LLMs through API calls.
|
; frontend for ollama and also handles other web LLMs through API calls.
|
||||||
; Container is over 1GB in size and consumes resources.
|
; Container is over 1GB in size and consumes substantial resources!
|
||||||
|
; URL: http://localhost:1337
|
||||||
;
|
;
|
||||||
; open_webui_port (default=3000)
|
; open_webui_port (default=3000)
|
||||||
; Port on which to run the open-webui Docker instance.
|
; Port on which to run the open-webui Docker instance.
|
||||||
;
|
;
|
||||||
; open_webui_key (default=yolo)
|
; open_webui_key (default=PleaseEnsureTheKeyIsAtLeast32To64Characters)
|
||||||
; Secret key, allows persistence between runs. If not a public-facing
|
; Secret key, allows persistence between runs. If not a public-facing
|
||||||
; system, then not critical. Use `openssl rand -hex 16` or larger.
|
; system, then not critical. Use `openssl rand -hex 32` to create one.
|
||||||
;
|
|
||||||
; hf_token (default=false)
|
|
||||||
; Token from Hugging Face which allows faster download speeds than anon.
|
|
||||||
;
|
;
|
||||||
; codium_config (default=true)
|
; codium_config (default=true)
|
||||||
; Manage the config files for and Codium plugins. Cline and Continue are
|
; Manage the config files for and Codium plugins. Cline and Continue are
|
||||||
; the recommended Codium extensions but need installed through the GUI.
|
; the recommended Codium extensions but need installed through the GUI.
|
||||||
; Currently handles:
|
; Currently handles:
|
||||||
; - ~/.continue/config.yml
|
; ~/.continue/config.yml
|
||||||
|
;
|
||||||
|
; qwen_code (default=true)
|
||||||
|
; Install and enable qwen-code as a daemon.
|
||||||
|
; URL: http://127.0.0.1:4170
|
||||||
;
|
;
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
state: present
|
state: present
|
||||||
@@ -373,10 +396,11 @@
|
|||||||
manage_models: "{{ lookup('ini', 'manage_models file={{wrk_file}} default=true' ) | bool }}"
|
manage_models: "{{ lookup('ini', 'manage_models file={{wrk_file}} default=true' ) | bool }}"
|
||||||
zeroclaw_enabled: "{{ lookup('ini', 'zero file={{wrk_file}} default=true ') | bool }}"
|
zeroclaw_enabled: "{{ lookup('ini', 'zero file={{wrk_file}} default=true ') | bool }}"
|
||||||
open_webui_enabled: "{{ lookup('ini', 'open_webui file={{wrk_file}} default=false') | bool }}"
|
open_webui_enabled: "{{ lookup('ini', 'open_webui file={{wrk_file}} default=false') | bool }}"
|
||||||
open_webui_port: "{{ lookup('ini', 'open_webui_port file={{wrk_file}} default=3000' ) | int }}"
|
open_webui_port: "{{ lookup('ini', 'open_webui_port file={{wrk_file}} default=1337' ) | int }}"
|
||||||
open_webui_key: "{{ lookup('ini', 'open_webui_key file={{wrk_file}} default=yolo' ) }}"
|
open_webui_key: "{{ lookup('ini', 'open_webui_key file={{wrk_file}} default=PleaseEnsureTheKeyIsAtLeast32To64Characters') }}"
|
||||||
hf_token: "{{ lookup('ini', 'hf_token file={{wrk_file}} default=false') }}"
|
hf_token: "{{ lookup('ini', 'hf_token file={{wrk_file}} default=false') }}"
|
||||||
codium_config: "{{ lookup('ini', 'codium_config file={{wrk_file}} default=true' ) | bool }}"
|
codium_config: "{{ lookup('ini', 'codium_config file={{wrk_file}} default=true' ) | bool }}"
|
||||||
|
qwen_code_enabled: "{{ lookup('ini', 'qwen_code file={{wrk_file}} default=true' ) | bool }}"
|
||||||
|
|
||||||
- name: General | Account Management | Provisioning Configuration | Workstation | Boolean Check | Editing
|
- name: General | Account Management | Provisioning Configuration | Workstation | Boolean Check | Editing
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
@@ -405,6 +429,7 @@
|
|||||||
- { 'open_webui_key': "{{ open_webui_key }}" }
|
- { 'open_webui_key': "{{ open_webui_key }}" }
|
||||||
- { 'hf_token': "{{ hf_token }}" }
|
- { 'hf_token': "{{ hf_token }}" }
|
||||||
- { 'codium_config': "{{ codium_config }}" }
|
- { 'codium_config': "{{ codium_config }}" }
|
||||||
|
- { 'qwen_code_enabled': "{{ qwen_code_enabled }}" }
|
||||||
|
|
||||||
# No longer mining, this is now considered deprecated.
|
# No longer mining, this is now considered deprecated.
|
||||||
### Miner ##
|
### Miner ##
|
||||||
|
|||||||
@@ -488,7 +488,55 @@
|
|||||||
|
|
||||||
# Qwen Serve - Start #
|
# Qwen Serve - Start #
|
||||||
|
|
||||||
# TBD
|
- name: Workstation | Linux | Software | LLMs | runit | qwen-code | Dir | /etc/sv
|
||||||
|
ansible.builtin.file:
|
||||||
|
name: "/etc/sv/{{ qwen_code }}/log"
|
||||||
|
state: directory
|
||||||
|
owner: root
|
||||||
|
mode: "0755"
|
||||||
|
|
||||||
|
- name: Workstation | Linux | Software | LLMs | runit | qwen-code | Dir | /var/log
|
||||||
|
ansible.builtin.file:
|
||||||
|
name: "/var/log/{{ qwen_code }}"
|
||||||
|
state: directory
|
||||||
|
owner: "{{ user }}"
|
||||||
|
mode: "0755"
|
||||||
|
|
||||||
|
- name: Workstation | Linux | Software | LLMs | runit | qwen-code | Script | Run
|
||||||
|
ansible.builtin.copy:
|
||||||
|
dest: /etc/sv/{{ qwen_code }}/run
|
||||||
|
content: |
|
||||||
|
#!/bin/sh -e
|
||||||
|
exec 2>&1
|
||||||
|
exec chpst -u {{ user }} -C {{ user_user.home }}/Code qwen serve
|
||||||
|
mode: "0755"
|
||||||
|
|
||||||
|
- name: Workstation | Linux | Software | LLMs | runit | qwen-code | Script | Finish
|
||||||
|
ansible.builtin.copy:
|
||||||
|
dest: /etc/sv/{{ qwen_code }}/finish
|
||||||
|
content: |
|
||||||
|
#!/bin/sh -e
|
||||||
|
exec 2>&1
|
||||||
|
# $1 is the exit code, $2 is the exit status byte (signal number if killed)
|
||||||
|
echo "FINISH: Service returned with exit code: $1 and status: $2"
|
||||||
|
mode: "0755"
|
||||||
|
|
||||||
|
- name: Workstation | Linux | Software | LLMs | runit | qwen-code | Script | Log
|
||||||
|
ansible.builtin.copy:
|
||||||
|
dest: /etc/sv/{{ qwen_code }}/log/run
|
||||||
|
content: |
|
||||||
|
#!/bin/sh -e
|
||||||
|
exec svlogd -tt /var/log/{{ qwen_code }}
|
||||||
|
mode: "0755"
|
||||||
|
|
||||||
|
- name: Workstation | Linux | Software | LLMs | runit | qwen-code | Script | Log Config
|
||||||
|
ansible.builtin.copy:
|
||||||
|
dest: /var/log/{{ qwen_code }}/config
|
||||||
|
content: |
|
||||||
|
s1000000 # rotate at 1 MB
|
||||||
|
n5 # keep 5 old files
|
||||||
|
dateformat %Y-%m-%d_%H-%M-%S # each run gets its own file.
|
||||||
|
mode: "0755"
|
||||||
|
|
||||||
# Qwen Serve - End #
|
# Qwen Serve - End #
|
||||||
|
|
||||||
@@ -503,10 +551,11 @@
|
|||||||
enabled: "{{ item.status }}"
|
enabled: "{{ item.status }}"
|
||||||
loop:
|
loop:
|
||||||
- { 'name': "{{ ollama }}" , 'status': "{{ ollama_enabled }}" }
|
- { 'name': "{{ ollama }}" , 'status': "{{ ollama_enabled }}" }
|
||||||
- { 'name': "{{ zeroclaw }}", 'status': "{{ zeroclaw_enabled }}" }
|
- { 'name': "{{ zeroclaw }}" , 'status': "{{ zeroclaw_enabled }}" }
|
||||||
- { 'name': 'docker' , 'status': true }
|
- { 'name': 'docker' , 'status': true }
|
||||||
- { 'name': 'open-webui' , 'status': "{{ open_webui_enabled }}" }
|
- { 'name': 'open-webui' , 'status': "{{ open_webui_enabled }}" }
|
||||||
- { 'name': 'swap-stopper' , 'status': true }
|
- { 'name': 'swap-stopper' , 'status': true }
|
||||||
|
- { 'name': '{{ qwen_code }}', 'status': "{{ qwen_code_enabled }}" }
|
||||||
|
|
||||||
- name: Workstation | Linux | Software | LLMs | Services | Verify
|
- name: Workstation | Linux | Software | LLMs | Services | Verify
|
||||||
ansible.builtin.uri:
|
ansible.builtin.uri:
|
||||||
@@ -545,14 +594,13 @@
|
|||||||
marker: "# {mark} ANSIBLE MANAGED BLOCK | ollama | Manual Script"
|
marker: "# {mark} ANSIBLE MANAGED BLOCK | ollama | Manual Script"
|
||||||
content: |
|
content: |
|
||||||
function pull_llms() {
|
function pull_llms() {
|
||||||
set -e
|
|
||||||
echo "Manually Pulling Models"
|
echo "Manually Pulling Models"
|
||||||
{% for llm in llm_installs %}
|
{% for llm in llm_installs %}
|
||||||
|
|
||||||
echo -e "\n\n Starting {{ llm.model }} \n\n"
|
echo -e "\n\n Starting 'ollama pull {{ llm.model }}' \n\n"
|
||||||
set -x
|
|
||||||
ollama pull {{ llm.model }}
|
ollama pull {{ llm.model }}
|
||||||
set +x
|
status=$?
|
||||||
|
echo "Finished with status $status."
|
||||||
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
echo "Done!!"
|
echo "Done!!"
|
||||||
|
|||||||
Reference in new issue
Block a user