From 1d00f8e9eb6295dd2908da53e56a442c53b18873 Mon Sep 17 00:00:00 2001 From: Zhenbo Li Date: Sat, 28 Sep 2024 10:14:15 -0400 Subject: [PATCH] adjust nice --- fire_seq_search_server/debug_server.sh | 2 +- fire_seq_search_server/src/local_llm/mod.rs | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/fire_seq_search_server/debug_server.sh b/fire_seq_search_server/debug_server.sh index ca8b8f8..d43a5ab 100644 --- a/fire_seq_search_server/debug_server.sh +++ b/fire_seq_search_server/debug_server.sh @@ -1,7 +1,7 @@ set -e rm -f ./fire_seq_search_server # nix-shell -p cargo -p rustc -p libiconv --run "cargo build" -cargo build +cargo build --features llm cp target/debug/fire_seq_search_server ./fire_seq_search_server export RUST_LOG="warn,fire_seq_search_server=info" diff --git a/fire_seq_search_server/src/local_llm/mod.rs b/fire_seq_search_server/src/local_llm/mod.rs index 9e8673d..f845232 100644 --- a/fire_seq_search_server/src/local_llm/mod.rs +++ b/fire_seq_search_server/src/local_llm/mod.rs @@ -125,8 +125,9 @@ impl LlmEngine { let lfile = locate_llamafile().await; let lfile:String = lfile.unwrap(); - let _cmd = Command::new("sh") - .args([ &lfile, "--nobrowser", + let _cmd = Command::new("nice") + .args([ "-n", "19", + &lfile, "--nobrowser", "--port", LLM_SERVER_PORT, //">/tmp/llamafile.stdout", "2>/tmp/llamafile.stderr", ])