diff --git a/tasks/workstation/linux/software/llm.yml b/tasks/workstation/linux/software/llm.yml index 2f6af34..7318dd8 100644 --- a/tasks/workstation/linux/software/llm.yml +++ b/tasks/workstation/linux/software/llm.yml @@ -288,11 +288,11 @@ export HOME={{ user_user.home }} ### Timeouts ### - export OLLAMA_LOAD_TIMEOUT=20m # default is 5m + export OLLAMA_LOAD_TIMEOUT=30m # default is 5m export OLLAMA_REQUEST_TIMEOUT=3600 # default 300 (unconfirmed, not in the list of --help vars) ### Resource Usage ### - export OLLAMA_KEEP_ALIVE=20m # default is 5m + export OLLAMA_KEEP_ALIVE=2h # default is 5m. Good frontends keep the model alive as long as it needs to be, this is not a source of timeout. export OLLAMA_MAX_LOADED_MODELS={{ llm_concurrency }} # default is 3 if using CPUs, or 3 * NumGPUs export OLLAMA_NUM_PARALLEL={{ llm_parallel }} # default is 1 and applies per-model (unconfirmed) export OLLAMA_CONTEXT_LENGTH={{ llm_context }} # default is 4096, https://docs.ollama.com/faq#how-can-i-specify-the-context-window-size @@ -310,7 +310,7 @@ {{ ("export HF_TOKEN=" ~ hf_token) if hf_token else '' }} ### Logging ### - export OLLAMA_DEBUG=1 + #export OLLAMA_DEBUG=1 export OLLAMA_METRICS=1 # (check http://127.0.0.1:11434/metrics) ### Other ### @@ -534,7 +534,7 @@ - name: Workstation | Linux | Software | LLMs | runit | open-terminal | AI-Sandbox | Env ansible.builtin.blockinfile: - path: "{{ user_user.home }}/AI-Sandbox/.bash_profile" + path: "{{ user_user.home }}/AI-Sandbox/{{ item }}" marker: "# {mark} | MANAGE BY ANSIBLE | Env Vars" content: | if [[ -d $HOME/bin ]]; then @@ -550,6 +550,84 @@ export JAVA_HOME="/home/user/SDKs/Java" export PATH="$JAVA_HOME/bin:$PATH" + create: false + backup: false + owner: "{{ user }}" + group: "{{ user }}" + mode: "0755" + loop: + - ".bashrc" + + - name: Workstation | Linux | Software | LLMs | runit | open-terminal | AI-Sandbox | Defaults + ansible.builtin.set_fact: + jdk_jvm: "{{ jdk_jvm | default('/usr/lib/jvm') }}" + + - name: Workstation | Linux | Software | LLMs | runit | open-terminal | AI-Sandbox | AGENTS.md + ansible.builtin.copy: + dest: "{{ user_user.home }}/AI-Sandbox/AGENTS.md" + content: | + # Environment + + - You are running in a Docker container called Open Terminal. We + are communicating via Open WebUI, also being run in a Docker + container. You are the user `user` and have been granted access to + the user's projects through a mount on `/home/user/Code`. + + # Rules + + Never use any `git` subcommands that change anything, including + but not limited to `add`, `commit`, `pull`, `push`, `branch`, + `switch`, etc. The user is who controls the respository changes. + You may informational git subcommands such as use `git status`. + + If any programs need installed in order to work on a project, we + need to document that in an install.sh script, as well as add it + to ~/PACKAGES.txt so that the user can ensure they stay installed. + install.sh scripts should be for both `apt` systems (Debian, + Ubuntu) and pacman system (Arch, Artix). using distribution + package managers is preferable over `pip` and `npm` when + possible, unless the project is actually Python or Node.js. + + The user manages the SDKs directory. Do not update or modify it. + Instead, ask if anything needs updated, modified, or added. + + Never manually edit, modify, delete, alter, replace, etc any + files under system folders such as `/usr`. Anything under `/` is + managed by the system. If you need assistance changing anything + such as `/usr/lib/jvm`, please ask the user and halt all further + operations until you have received feedback. + + It is never okay to brute force a solution if something is not + working well. it is better to ask the user for assistance or alert + them that you've encountered blockers and then cease the process + until you've received feedback. + + `SDKs` is mounted as read-only. + Please let me know if any changes need made to these directories. + + # Preferences + + You have free reign over your home directory. Feel free to + create memory files or anything else which would benefit you. + + Everything we create should have both Desktop Linux and Android + in mind. Windows, MacOS, and iOS will never be compiled for, but + if we can do things in a way which makes it easy for others to + fork the project and add the support themselves, then that's best. + + # Versions + + These are the versions of plugins and languages we need to use. + If you know of an important upgrade from them, please let me know. + + ## Android + + - Gradle: 9.8.0 + - AGP: 9.4.1 + - Kotlin: 2.4.20 + - Java: JDK 17 + - Flutter (plugin loader): 1.0.0 + backup: false owner: "{{ user }}" group: "{{ user }}" mode: "0755" @@ -596,7 +674,7 @@ -v {{ user_user.home }}/AI-Sandbox:/home/user \ -v {{ user_user.home }}/Code:/home/user/Code \ -v {{ user_user.home }}/SDKs:/home/user/SDKs \ - -v {{ jdk_src }}:{{ jdk_src }} \ + -v {{ jdk_jvm }}:{{ jdk_jvm }}:ro \ -v {{ user_user.home }}/.gradle:/home/user/.gradle \ -v {{ user_user.home }}/.pub_cache:/home/user/.pub_cache \ -e OPEN_TERMINAL_FILE_BROWSER_ROOT="/home/user" \