Get up and running with Kimi, GLM, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.
use `gzip` for runner embedding (#2067)
Jeffrey Morgandc88cc398115
diff --git a/llm/generate/gen_common.sh b/llm/generate/gen_common.shindex 703cb1d46..5cb237daf 100644--- a/llm/generate/gen_common.sh+++ b/llm/generate/gen_common.sh@@ -84,7 +84,7 @@ compress_libs() {echo "Compressing payloads to reduce overall binary size..."pids=""for lib in ${BUILD_DIR}/lib/*.${LIB_EXT}* ; do- bzip2 -v9 ${lib} &+ gzip --best ${lib} &pids+=" $!"doneechodiff --git a/llm/generate/gen_windows.ps1 b/llm/generate/gen_windows.ps1index dc0992f5d..e5d99f378 100644--- a/llm/generate/gen_windows.ps1+++ b/llm/generate/gen_windows.ps1@@ -23,7 +23,7 @@ function init_vars {} else {$script:CUDA_LIB_DIR=$env:CUDA_LIB_DIR}- $script:BZIP2=(get-command -ea 'silentlycontinue' bzip2).path+ $script:GZIP=(get-command -ea 'silentlycontinue' gzip).path$script:DUMPBIN=(get-command -ea 'silentlycontinue' dumpbin).path}@@ -69,14 +69,14 @@ function install {}function compress_libs {- if ($script:BZIP2 -eq $null) {- write-host "bzip2 not installed, not compressing files"+ if ($script:GZIP -eq $null) {+ write-host "gzip not installed, not compressing files"return}write-host "Compressing dlls..."$libs = dir "${script:buildDir}/lib/*.dll"foreach ($file in $libs) {- & "$script:BZIP2" -v9 $file+ & "$script:GZIP" --best $file}}diff --git a/llm/payload_common.go b/llm/payload_common.goindex 70610322b..d0218979c 100644--- a/llm/payload_common.go+++ b/llm/payload_common.go@@ -1,7 +1,7 @@package llmimport (- "compress/bzip2"+ "compress/gzip""errors""fmt""io"@@ -182,9 +182,12 @@ func extractDynamicLibs(workDir, glob string) ([]string, error) {}src := io.Reader(srcFile)filename := file- if strings.HasSuffix(file, ".bz2") {- src = bzip2.NewReader(src)- filename = strings.TrimSuffix(filename, ".bz2")+ if strings.HasSuffix(file, ".gz") {+ src, err = gzip.NewReader(src)+ if err != nil {+ return fmt.Errorf("decompress payload %s: %v", file, err)+ }+ filename = strings.TrimSuffix(filename, ".gz")}destFile := filepath.Join(targetDir, filepath.Base(filename))@@ -229,9 +232,12 @@ func extractPayloadFiles(workDir, glob string) error {}src := io.Reader(srcFile)filename := file- if strings.HasSuffix(file, ".bz2") {- src = bzip2.NewReader(src)- filename = strings.TrimSuffix(filename, ".bz2")+ if strings.HasSuffix(file, ".gz") {+ src, err = gzip.NewReader(src)+ if err != nil {+ return fmt.Errorf("decompress payload %s: %v", file, err)+ }+ filename = strings.TrimSuffix(filename, ".gz")}destFile := filepath.Join(workDir, filepath.Base(filename))diff --git a/scripts/rh_linux_deps.sh b/scripts/rh_linux_deps.shindex 1d5b181cd..ec6b20a03 100644--- a/scripts/rh_linux_deps.sh+++ b/scripts/rh_linux_deps.sh@@ -28,7 +28,6 @@ fiif [ -n "${CMAKE_VERSION}" ]; thencurl -s -L https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-$(uname -m).tar.gz | tar -zx -C /usr --strip-components 1- dnf install -y bzip2fiif [ -n "${GOLANG_VERSION}" ]; then