llm, enhance comments in the ollama run script.
This commit is contained in:
@@ -182,20 +182,25 @@
|
|||||||
dest: "{{ ollama_runit_script }}"
|
dest: "{{ ollama_runit_script }}"
|
||||||
content: |
|
content: |
|
||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
# Allow pulling LLMs for use with ZeroClaw.
|
# Allow pulling and accessing LLMs via tools.
|
||||||
exec 2>&1
|
exec 2>&1
|
||||||
|
### Required ###
|
||||||
export HOME={{ user_user.home }}
|
export HOME={{ user_user.home }}
|
||||||
# Timeouts #
|
### Timeouts ###
|
||||||
export OLLAMA_LOAD_TIMEOUT=20m # default is 5m
|
export OLLAMA_LOAD_TIMEOUT=20m # default is 5m
|
||||||
export OLLAMA_REQUEST_TIMEOUT=3600 # default 300 (unconfirmed, not in the list of --help vars)
|
export OLLAMA_REQUEST_TIMEOUT=3600 # default 300 (unconfirmed, not in the list of --help vars)
|
||||||
# Resource Usage #
|
### Resource Usage ###
|
||||||
export OLLAMA_KEEP_ALIVE=20m # default is 5m
|
export OLLAMA_KEEP_ALIVE=20m # default is 5m
|
||||||
export OLLAMA_MAX_LOADED_MODELS={{ llm_concurrency }} # default is 3 if using CPUs, or 3 * NumGPUs
|
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_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
|
export OLLAMA_CONTEXT_LENGTH={{ llm_context }} # default is 4096, https://docs.ollama.com/faq#how-can-i-specify-the-context-window-size
|
||||||
export OLLAMA_MAX_QUEUE=999 # default is 512 (unconfirmed)
|
export OLLAMA_MAX_QUEUE=999 # default is 512 (unconfirmed)
|
||||||
# Prevent Data Loss #
|
### Prevent Data Loss ###
|
||||||
export OLLAMA_NOPRUNE=1 # Default is 0, which causes unfinished pulls to be deleeted after 1 hour. (unconfirmed)
|
# OLLAMA_NOPRUNE
|
||||||
|
# Default is 0, which causes unfinished pulls to be deleted
|
||||||
|
# after 1 hour of inactivity. To manually clean partials, run:
|
||||||
|
# `rm ~/.ollama/models/blobs/*-partial*`
|
||||||
|
export OLLAMA_NOPRUNE=1
|
||||||
exec chpst -u {{ user }} ollama serve
|
exec chpst -u {{ user }} ollama serve
|
||||||
mode: "0755"
|
mode: "0755"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user