adjust build system for libretranslate
This commit is contained in:
2
libretranslate/.gitignore
vendored
Normal file
2
libretranslate/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/venv/
|
||||
/db/
|
17
libretranslate/make.mk
Normal file
17
libretranslate/make.mk
Normal file
@@ -0,0 +1,17 @@
|
||||
LIBRETRANSLATE_PYTHON_VERSION = 3.10.12
|
||||
|
||||
.PHONY: libretranslate
|
||||
libretranslate: libretranslate/venv
|
||||
cd libretranslate && . venv/bin/activate && libretranslate --port 5000 --load-only en,cs
|
||||
|
||||
.PHONY: libretranslate_clean
|
||||
libretranslate_clean:
|
||||
rm -rf libretranslate/venv
|
||||
rm -rf libretranslate/db
|
||||
|
||||
libretranslate/venv:
|
||||
pyenv install -s $(LIBRETRANSLATE_PYTHON_VERSION)
|
||||
cd libretranslate && \
|
||||
PYENV_VERSION=$(LIBRETRANSLATE_PYTHON_VERSION) pyenv exec python -m venv venv
|
||||
cd libretranslate && . venv/bin/activate && \
|
||||
pip install --upgrade pip && pip install -r requirements.txt
|
3
libretranslate/requirements.txt
Normal file
3
libretranslate/requirements.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
libretranslate
|
||||
torch==2.2.0
|
||||
|
Reference in New Issue
Block a user