forked from chaquo/chaquopy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Ctranslate2-lib and Ctranslate2-python. Fixes chaquo#1239.
- Loading branch information
aryansharma
authored and
aryansharma
committed
Sep 28, 2024
1 parent
1b2fed5
commit 6c5d3a7
Showing
4 changed files
with
52 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
|
||
# Set up the build directory | ||
mkdir -p build | ||
cd build | ||
|
||
cmake .. -DCMAKE_INSTALL_PREFIX=$CHAQUOPY_LIB/ctranslate2-lib \ | ||
-DCMAKE_LIBRARY_PATH=/home/aryan/llvm-project/openmp/runtime/src/libiomp5.so | ||
|
||
# Compile the C++ library | ||
make -j4 | ||
sudo make install | ||
sudo ldconfig |
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,14 @@ | ||
package: | ||
name: "ctranslate2-lib" | ||
version: "4.1.0" | ||
|
||
source: | ||
git_url: https://github.com/OpenNMT/CTranslate2.git | ||
git_rev: v4.1.0 # Use the correct version tag | ||
|
||
build: | ||
number: 0 | ||
|
||
requirements: | ||
build: | ||
- cmake 3.30.2 |
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,8 @@ | ||
#!/bin/bash | ||
|
||
# Set the path to the C++ library | ||
export CTRANSLATE2_ROOT=$CHAQUOPY_LIB/ctranslate2-lib | ||
|
||
pip install -r install_requirements.txt | ||
python setup.py bdist_wheel | ||
pip install dist/*.whl |
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,17 @@ | ||
package: | ||
name: "ctranslate2-python" | ||
version: "4.1.0" | ||
|
||
source: | ||
path: /home/aryan/CTranslate2/python | ||
|
||
build: | ||
number: 0 | ||
|
||
|
||
requirements: | ||
build: | ||
- pybind11 2.11.1 | ||
host: | ||
- ctranslate2-lib 4.1.0 # Add dependency on the C++ library | ||
|