From 34ddd874fec4d6838cdfe92a4753277c889e1fc5 Mon Sep 17 00:00:00 2001 From: Concedo <39025047+LostRuins@users.noreply.github.com> Date: Fri, 4 Apr 2025 19:08:51 +0800 Subject: [PATCH] try containerized ci (+3 squashed commit) Squashed commit: [f0600744] troubleshooting [fe11073c] cap auto threads at 32 due to diminishing returns [0c7f8a1d] troubleshooting --- .../workflows/kcpp-build-release-linux-cuda12.yaml | 11 ++++++++++- .github/workflows/kcpp-build-release-linux.yaml | 11 ++++++++++- koboldcpp.py | 3 +++ 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/.github/workflows/kcpp-build-release-linux-cuda12.yaml b/.github/workflows/kcpp-build-release-linux-cuda12.yaml index 5365a1012..4ee4d6ae4 100644 --- a/.github/workflows/kcpp-build-release-linux-cuda12.yaml +++ b/.github/workflows/kcpp-build-release-linux-cuda12.yaml @@ -23,7 +23,16 @@ jobs: run: | apt-get update apt-get install -y sudo - sudo apt-get -y install git curl bzip2 + export DEBIAN_FRONTEND=noninteractive + sudo ln -fs /usr/share/zoneinfo/UTC /etc/localtime + echo "tzdata tzdata/Areas select Etc" | sudo debconf-set-selections + echo "tzdata tzdata/Zones/Etc select UTC" | sudo debconf-set-selections + sudo apt-get -y install git curl bzip2 python3-tk tcl tk + + - name: Set Tcl/Tk Paths + run: | + echo "TCL_LIBRARY=$(find /usr/lib/ -name 'tcl8*' | head -n 1)" >> $GITHUB_ENV + echo "TK_LIBRARY=$(find /usr/lib/ -name 'tk8*' | head -n 1)" >> $GITHUB_ENV - name: Build id: make_build diff --git a/.github/workflows/kcpp-build-release-linux.yaml b/.github/workflows/kcpp-build-release-linux.yaml index 106692169..b480db6e4 100644 --- a/.github/workflows/kcpp-build-release-linux.yaml +++ b/.github/workflows/kcpp-build-release-linux.yaml @@ -23,7 +23,16 @@ jobs: run: | apt-get update apt-get install -y sudo - sudo apt-get -y install git curl bzip2 + export DEBIAN_FRONTEND=noninteractive + sudo ln -fs /usr/share/zoneinfo/UTC /etc/localtime + echo "tzdata tzdata/Areas select Etc" | sudo debconf-set-selections + echo "tzdata tzdata/Zones/Etc select UTC" | sudo debconf-set-selections + sudo apt-get -y install git curl bzip2 python3-tk tcl tk + + - name: Set Tcl/Tk Paths + run: | + echo "TCL_LIBRARY=$(find /usr/lib/ -name 'tcl8*' | head -n 1)" >> $GITHUB_ENV + echo "TK_LIBRARY=$(find /usr/lib/ -name 'tk8*' | head -n 1)" >> $GITHUB_ENV - name: Build id: make_build diff --git a/koboldcpp.py b/koboldcpp.py index 3bccc372f..3651ceb15 100644 --- a/koboldcpp.py +++ b/koboldcpp.py @@ -384,6 +384,9 @@ def get_default_threads(): processor = platform.processor() if 'Intel' in processor: default_threads = (8 if default_threads > 8 else default_threads) #this helps avoid e-cores. + if default_threads > 48: + print(f"Auto CPU Threads capped at 48 (instead of {default_threads}). You can override this by passing an explicit number of --threads.") + default_threads = 48 return default_threads def pick_existant_file(ntoption,nonntoption):