Skip to content

Latest commit

 

History

History
39 lines (31 loc) · 1.58 KB

test03-ctranslate2.md

File metadata and controls

39 lines (31 loc) · 1.58 KB

Test 3: build cTranslate2 to use faster-whisper

📑 in case u need official docs: https://github.com/OpenNMT/CTranslate2/blob/master/docs/installation.md

git clone
	--single-branch
	--depth=1
	--recurse-submodules
	--shallow-submodules
	https://github.com/OpenNMT/CTranslate2

if intel cpu:

if not intel cpu: add -D OPENMP_RUNTIME=NONE -D WITH_MKL=OFF to command below

need Visual Studio console + prepare a fresh python env with pip install pybind11

cmake -S . -B build -D WITH_CUDA=ON -D WITH_CUDNN=ON -D CUDA_DYNAMIC_LOADING=ON -D CUDA_NVCC_FLAGS="--threads=0" -D CUDA_ARCH_LIST=█.█
msbuild build\ALL_BUILD.vcxproj -noLogo -maxCpuCount -property:Configuration=Release -verbosity:minimal
# cmake --build build --config Release --parallel

then navigate console to folder python/

edit file setup.py line 11-12:

include_dirs = [pybind11.get_include(), "../include"]
library_dirs = ["../build/Release"]

then run pip wheel . --wheel-dir="dist" --verbose

wheel file in dist\ctranslate2-█.██.█-cp3██-cp3██-win_amd64.whl

ERROR: module 'ctranslate2' has no attribute 'StorageView'