From 4c002eba6aba1e12ecdf259fd1bdb463509df02b Mon Sep 17 00:00:00 2001 From: "Rodrigo Rodriguez (Pragmatismo)" Date: Thu, 11 Sep 2025 14:50:45 -0300 Subject: [PATCH] -Hardcoded llama tests --- src/scripts/containers/drive.sh | 4 ++++ src/scripts/containers/system.sh | 5 +++++ src/scripts/database/0002.sql | 20 ++++++++++---------- src/services/llm_local.rs | 2 +- 4 files changed, 20 insertions(+), 11 deletions(-) diff --git a/src/scripts/containers/drive.sh b/src/scripts/containers/drive.sh index 0bb2abf..4a9eda3 100644 --- a/src/scripts/containers/drive.sh +++ b/src/scripts/containers/drive.sh @@ -17,6 +17,10 @@ apt-get update && apt-get install -y wget wget https://dl.min.io/server/minio/release/linux-amd64/minio -O /usr/local/bin/minio chmod +x /usr/local/bin/minio +wget https://dl.min.io/client/mc/release/linux-amd64/mc -O /usr/local/bin/mc +chmod +x /usr/local/bin/mc + + useradd -r -s /bin/false minio-user || true mkdir -p /var/log/minio /data chown -R minio-user:minio-user /var/log/minio /data diff --git a/src/scripts/containers/system.sh b/src/scripts/containers/system.sh index 52714c3..d0bcf2e 100644 --- a/src/scripts/containers/system.sh +++ b/src/scripts/containers/system.sh @@ -36,6 +36,11 @@ rm llama-b6148-bin-ubuntu-x64.zip wget https://huggingface.co/bartowski/DeepSeek-R1-Distill-Qwen-1.5B-GGUF/resolve/main/DeepSeek-R1-Distill-Qwen-1.5B-Q3_K_M.gguf wget https://huggingface.co/CompendiumLabs/bge-small-en-v1.5-gguf/resolve/main/bge-small-en-v1.5-f32.gguf +sudo curl -fsSLo /usr/share/keyrings/brave-browser-beta-archive-keyring.gpg https://brave-browser-apt-beta.s3.brave.com/brave-browser-beta-archive-keyring.gpg +sudo curl -fsSLo /etc/apt/sources.list.d/brave-browser-beta.sources https://brave-browser-apt-beta.s3.brave.com/brave-browser.sources +sudo apt update + +sudo apt install brave-browser-beta curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y source "$HOME/.cargo/env" diff --git a/src/scripts/database/0002.sql b/src/scripts/database/0002.sql index bace0cb..b5a2aed 100644 --- a/src/scripts/database/0002.sql +++ b/src/scripts/database/0002.sql @@ -1,11 +1,11 @@ - CREATE TABLE system_automations ( - id uuid PRIMARY KEY, - kind NUMBER, - target VARCHAR(32), - schedule CHAR(6), - param VARCHAR(32) NOT NULL, - is_active BOOL NOT NULL DEFAULT TRUE, - last_triggered TIMESTAMPTZ +CREATE TABLE public.system_automations ( + id uuid NOT NULL, + kind int4 NULL, + target varchar(32) NULL, + schedule bpchar(12) NULL, + param varchar(32) NOT NULL, + is_active bool DEFAULT true NOT NULL, + last_triggered timestamptz NULL, + CONSTRAINT system_automations_pkey PRIMARY KEY (id) ); - -CREATE INDEX idx_active_automations ON system_automations(kind) WHERE is_active; +CREATE INDEX idx_active_automations ON public.system_automations USING btree (kind) WHERE is_active; diff --git a/src/services/llm_local.rs b/src/services/llm_local.rs index 2216d6d..746d367 100644 --- a/src/services/llm_local.rs +++ b/src/services/llm_local.rs @@ -187,7 +187,7 @@ async fn start_llm_server( let mut cmd = tokio::process::Command::new("sh"); cmd.arg("-c").arg(format!( - "cd {} && ./llama-server -m {} --host 0.0.0.0 --port {} --n-gpu-layers 99 &", + "cd {} && ./llama-server -m {} --host 0.0.0.0 --port {} --threads 8 --threads-batch 18 --temp 0.7 --parallel 3 --repeat-penalty 1.1 --ctx-size 2096 --batch-size 2048 -n 255 --mlock --no-mmap &", llama_cpp_path, model_path, port ));