Skip to content

Commit

Permalink
Merge pull request #5 from blocklessnetwork/feature/libwisper
Browse files Browse the repository at this point in the history
extract the lib file, and achive it
  • Loading branch information
Joinhack authored Nov 2, 2024
2 parents 9092235 + b8bb253 commit e5037c2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
- name: Extract
run: |
make extract_wasi
tar czvf whisper.wasm.tar.gz whisper.wasm
tar czvf whisper.wasm.tar.gz whisper.wasm libwhisper.a
- name: upload artifact
uses: actions/upload-release-asset@v1
env:
Expand Down
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@ RUN mkdir ./build /out -p && \
cd build && \
cmake ../ -DLLAMA_ACCELERATE=OFF -DGGML_NO_ACCELERATE=ON -DWHISPER_BUILD_EXAMPLES=ON -DCMAKE_TOOLCHAIN_FILE=${WASI_SDK}/share/cmake/wasi-sdk-pthread.cmake &&\
make && \
mv bin/main /out/whisper.wasm
mv bin/main /out/whisper.wasm &&\\
mv libwhisper.a /out/libwhisper.a
RUN /work/binaryen/bin/wasm-opt -O3 -o /out/whisper.wasm /out/whisper.wasm

FROM scratch as whisper
COPY --link --from=maker /out/whisper.wasm /whisper.wasm
COPY --link --from=maker /out/libwhisper.a /libwhisper.a



3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ push:
extract_wasi:
docker run --name tmp.container.${IMAGE_NAME} ghcr.io/blocklessnetwork/${IMAGE_NAME}:${IMAGE_TAG_VERSION} ls || echo 1
docker ps -a
docker cp tmp.container.${IMAGE_NAME}:/whisper.wasm .
docker cp tmp.container.${IMAGE_NAME}:/whisper.wasm .
docker cp tmp.container.${IMAGE_NAME}:/libwhisper.a .

0 comments on commit e5037c2

Please sign in to comment.