Skip to content

Commit

Permalink
Merge pull request #549 from rhatdan/version
Browse files Browse the repository at this point in the history
Fix llama-run to be installed with correct library paths.
  • Loading branch information
rhatdan authored Jan 8, 2025
2 parents 4bf31ec + 5e86f58 commit 956f8f7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 5 additions & 2 deletions container-images/scripts/build_llama_and_whisper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -74,6 +76,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
Expand Down Expand Up @@ -105,7 +108,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
Expand Down
2 changes: 0 additions & 2 deletions ramalama/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 956f8f7

Please sign in to comment.