diff --git a/server/pypi/packages/ctranslate2-lib/build.sh b/server/pypi/packages/ctranslate2-lib/build.sh new file mode 100755 index 0000000000..d2e1056f53 --- /dev/null +++ b/server/pypi/packages/ctranslate2-lib/build.sh @@ -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 diff --git a/server/pypi/packages/ctranslate2-lib/meta.yaml b/server/pypi/packages/ctranslate2-lib/meta.yaml new file mode 100644 index 0000000000..3515a7a20f --- /dev/null +++ b/server/pypi/packages/ctranslate2-lib/meta.yaml @@ -0,0 +1,14 @@ +package: + name: "ctranslate2-lib" + version: "4.1.0" + +source: + path : ../../../../../../CTranslate2 + + +build: + number: 0 + +requirements: + build: + - cmake 3.30.2 diff --git a/server/pypi/packages/ctranslate2-python/build.sh b/server/pypi/packages/ctranslate2-python/build.sh new file mode 100755 index 0000000000..acca3a3217 --- /dev/null +++ b/server/pypi/packages/ctranslate2-python/build.sh @@ -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 \ No newline at end of file diff --git a/server/pypi/packages/ctranslate2-python/meta.yaml b/server/pypi/packages/ctranslate2-python/meta.yaml new file mode 100644 index 0000000000..4ab0a93e02 --- /dev/null +++ b/server/pypi/packages/ctranslate2-python/meta.yaml @@ -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 +