Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Ctranslate2 #1253

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions server/pypi/packages/ctranslate2-lib/build.sh
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
14 changes: 14 additions & 0 deletions server/pypi/packages/ctranslate2-lib/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package:
name: "ctranslate2-lib"
version: "4.1.0"

source:
path : ../../../../../../CTranslate2


build:
number: 0

requirements:
build:
- cmake 3.30.2
8 changes: 8 additions & 0 deletions server/pypi/packages/ctranslate2-python/build.sh
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
17 changes: 17 additions & 0 deletions server/pypi/packages/ctranslate2-python/meta.yaml
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