From 9af098d49a2d3ed257d9ff7dad510a48f8a0578d Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Tue, 7 Jan 2025 16:42:09 -0500 Subject: [PATCH 1/2] Revert "This might temporarily fix an issue we are having" This reverts commit 8f92ca396c995c4e70ce20110ece7c396229ff64. Signed-off-by: Daniel J Walsh --- container-images/scripts/build_llama_and_whisper.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/container-images/scripts/build_llama_and_whisper.sh b/container-images/scripts/build_llama_and_whisper.sh index ad1c5994..c3670050 100644 --- a/container-images/scripts/build_llama_and_whisper.sh +++ b/container-images/scripts/build_llama_and_whisper.sh @@ -74,6 +74,7 @@ clone_and_build_whisper_cpp() { local install_prefix="$1" local whisper_flags=("${!2}") local whisper_cpp_sha="8a9ad7844d6e2a10cddf4b92de4089d7ac2b14a9" + whisper_flags+=("-DBUILD_SHARED_LIBS=NO") git clone https://github.com/ggerganov/whisper.cpp cd whisper.cpp @@ -105,7 +106,7 @@ main() { local common_flags configure_common_flags "$containerfile" common_flags - common_flags+=("-DGGML_CCACHE=0" "-DCMAKE_INSTALL_PREFIX=$install_prefix" "-DBUILD_SHARED_LIBS=NO") + common_flags+=("-DGGML_CCACHE=0" "-DCMAKE_INSTALL_PREFIX=$install_prefix") dnf_install clone_and_build_whisper_cpp "$install_prefix" common_flags[@] case "$containerfile" in From 5e86f581ba4e907451ec9518103d4d9754a3021e Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Tue, 7 Jan 2025 16:42:38 -0500 Subject: [PATCH 2/2] Fix installation of llama.cpp Signed-off-by: Daniel J Walsh --- container-images/scripts/build_llama_and_whisper.sh | 4 +++- ramalama/model.py | 2 -- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/container-images/scripts/build_llama_and_whisper.sh b/container-images/scripts/build_llama_and_whisper.sh index c3670050..ecf647cf 100644 --- a/container-images/scripts/build_llama_and_whisper.sh +++ b/container-images/scripts/build_llama_and_whisper.sh @@ -41,7 +41,9 @@ cmake_steps() { local cmake_flags=("${!1}") cmake -B build "${cmake_flags[@]}" cmake --build build --config Release -j"$(nproc)" - cmake --install build + cmake --install build --prefix=/usr + #HACK libggml-cpu.so is being installed in the wrong place should be in /usr/lib64 + test -f /usr/lib/libggml-cpu.so && mv /usr/lib/libggml-cpu.so /usr/lib64 } set_install_prefix() { diff --git a/ramalama/model.py b/ramalama/model.py index 959c2c58..40a245ae 100644 --- a/ramalama/model.py +++ b/ramalama/model.py @@ -246,8 +246,6 @@ def exec_model_in_container(self, model_path, cmd_args, args): # Make sure Image precedes cmd_args. conman_args += [self._image(args)] cargs = shlex.join(cmd_args) - if not args.debug: - cargs += " 2> /dev/null" conman_args += ["/bin/sh", "-c", cargs] if args.dryrun: