-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add CUDA support for Linux * Update build_cpp.yml * Update build_cpp.yml * Update build_cpp.yml * Update build_cpp.yml * Update build_cpp.yml * Update build_cpp.yml * Update build_cpp.yml * Update build_cpp.yml * Update build_cpp.yml * Update build_cpp.yml * Update build_cpp.yml * Update build_cpp.yml * Update build_cpp.yml * Update build_cpp.yml * Update build_cpp.yml * Linux code support * Update test.yml * Test before commit * Meta? * Like that? * Update README.md * Some minor fixes
- Loading branch information
Showing
8 changed files
with
145 additions
and
36 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -84,9 +84,8 @@ jobs: | |
if-no-files-found: error | ||
|
||
build-linux: | ||
name: Build for Linux (Ubuntu 18.04 x86_64) | ||
runs-on: ubuntu-latest | ||
container: ubuntu:18.04 | ||
name: Build for Linux (x86_64) | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Clone whisper.unity | ||
uses: actions/checkout@v3 | ||
|
@@ -99,40 +98,55 @@ jobs: | |
repository: ${{ github.event.inputs.whisper_cpp_repo }} | ||
ref: ${{ github.event.inputs.whisper_cpp_repo_ref }} | ||
path: whisper-cpp | ||
|
||
- name: Latest Cmake | ||
run: | | ||
apt-get update \ | ||
&& apt-get install -y build-essential \ | ||
&& apt-get install -y wget \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
&& wget https://github.com/Kitware/CMake/releases/download/v3.24.1/cmake-3.24.1-Linux-x86_64.sh \ | ||
-q -O /tmp/cmake-install.sh \ | ||
&& chmod u+x /tmp/cmake-install.sh \ | ||
&& mkdir /opt/cmake-3.24.1 \ | ||
&& /tmp/cmake-install.sh --skip-license --prefix=/opt/cmake-3.24.1 \ | ||
&& rm /tmp/cmake-install.sh \ | ||
&& ln -s /opt/cmake-3.24.1/bin/* /usr/local/bin | ||
- name: Change gcc and g++ | ||
run: | | ||
apt-get update | ||
apt-get install -y gcc-8 g++-8 | ||
|
||
- name: Run build script | ||
run: | | ||
cd whisper-unity | ||
sh build_cpp_linux.sh ../whisper-cpp/ | ||
env: | ||
CC: gcc-8 | ||
CXX: g++-8 | ||
sh build_cpp_linux.sh ../whisper-cpp/ cpu | ||
- name: Upload results | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: linux | ||
path: ${{ github.workspace }}/whisper-cpp/build/libwhisper.so | ||
if-no-files-found: error | ||
|
||
build-linux-cuda: | ||
name: Build for Linux (x86_64, CUDA) | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Clone whisper.unity | ||
uses: actions/checkout@v3 | ||
with: | ||
path: whisper-unity | ||
|
||
- name: Clone whisper.cpp | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: ${{ github.event.inputs.whisper_cpp_repo }} | ||
ref: ${{ github.event.inputs.whisper_cpp_repo_ref }} | ||
path: whisper-cpp | ||
|
||
- name: Install CUDA Toolkit | ||
id: cuda-toolkit | ||
uses: Jimver/[email protected] | ||
with: | ||
cuda: '12.2.0' | ||
method: 'network' | ||
|
||
- name: Run build script | ||
run: | | ||
cd whisper-unity | ||
sh build_cpp_linux.sh ../whisper-cpp cuda | ||
cd ${{ github.workspace }}/whisper-cpp/build/ | ||
mv libwhisper.so libwhisper_cuda.so | ||
- name: Upload results | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: linux-cuda | ||
path: ${{ github.workspace }}/whisper-cpp/build/libwhisper_cuda.so | ||
if-no-files-found: error | ||
|
||
build-macos: | ||
name: Build for MacOS (ARM, x86_64) | ||
|
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
Binary file not shown.
Binary file not shown.
63 changes: 63 additions & 0 deletions
63
Packages/com.whisper.unity/Plugins/Linux/libwhisper_cuda.so.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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