-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure llama.cpp version is the same accross containers. Removing some duplicate actions, etc. Signed-off-by: Eric Curtin <[email protected]>
- Loading branch information
1 parent
5791050
commit 210e6fe
Showing
7 changed files
with
72 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/bin/bash | ||
|
||
main() { | ||
set -e | ||
|
||
local llama_cpp_sha="$1" | ||
local whisper_cpp_sha="$2" | ||
local install_prefix="$3" | ||
local ggml_flag="$4" | ||
git clone https://github.com/ggerganov/llama.cpp | ||
cd llama.cpp | ||
git reset --hard "$llama_cpp_sha" | ||
cmake -B build -DGGML_CCACHE=0 $ggml_flag \ | ||
-DCMAKE_INSTALL_PREFIX="$install_prefix" | ||
cmake --build build --config Release -j$(nproc) | ||
cmake --install build | ||
cd .. | ||
rm -rf llama.cpp | ||
|
||
git clone https://github.com/ggerganov/whisper.cpp | ||
cd whisper.cpp | ||
git reset --hard "$whisper_cpp_sha" | ||
cmake -B build -DGGML_CCACHE=0 $ggml_flag \ | ||
-DBUILD_SHARED_LIBS=NO -DCMAKE_INSTALL_PREFIX="$install_prefix" | ||
cmake --build build --config Release -j$(nproc) | ||
cmake --install build | ||
mv build/bin/main "$install_prefix/bin/whisper-main" | ||
mv build/bin/server "$install_prefix/bin/whisper-server" | ||
cd .. | ||
rm -rf whisper.cpp | ||
} | ||
|
||
main "$@" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,7 @@ | ||
FROM quay.io/ramalama/ramalama:latest | ||
|
||
RUN /usr/bin/python3 --version | ||
|
||
RUN git clone https://github.com/ggerganov/llama.cpp && \ | ||
cd llama.cpp && \ | ||
git reset --hard ${LLAMA_CPP_SHA} && \ | ||
cmake -B build -DCMAKE_INSTALL_PREFIX:PATH=/usr -DGGML_CCACHE=0 \ | ||
-DGGML_VULKAN=1 && \ | ||
cmake --build build --config Release -j $(nproc) && \ | ||
cmake --install build && \ | ||
cd / && \ | ||
git clone https://github.com/ggerganov/whisper.cpp.git && \ | ||
cd whisper.cpp && \ | ||
git reset --hard ${WHISPER_CPP_SHA} && \ | ||
cmake -B build -DCMAKE_INSTALL_PREFIX:PATH=/usr -DGGML_CCACHE=0 \ | ||
-DGGML_VULKAN=1 && \ | ||
cmake --build build --config Release -j $(nproc) && \ | ||
mv build/bin/main /usr/bin/whisper-main && \ | ||
mv build/bin/server /usr/bin/whisper-server && \ | ||
cd / && \ | ||
rm -rf llama.cpp whisper.cpp | ||
COPY ../scripts /scripts | ||
RUN chmod +x /scripts/*.sh && \ | ||
/scripts/build_llama_and_whisper.sh "$LLAMA_CPP_SHA" "$WHISPER_CPP_SHA" \ | ||
"/usr" "-DGGML_VULKAN=1" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters