Release v0.6.0 #34
Crivella
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Release v0.6.0
The main change is the introduction of a plugin manager to install the plugins+dependencies on demand.
This makes the release versions (both windows EXE and docker image) much smaller, and allow users to decide which functionalities they want to use.
IMPORTANT
From version 0.6 onward python and pip need to be installed on the system.
See more below in the Changes section.
Windows: https://www.python.org/downloads/windows/
Linux: Use your package manager (e.g. sudo apt install python3 python3-pip)
While i think for the most part everything should work fine, i assume there might be some edge cases that I've not considered,
that might make the way I've handled the plugin manager not work for everyone.
Feel free to report such issues and I'll try to fix them as soon as possible.
(If to many problems arise I might consider redesigning the plugin manager itself)
Changes
For this reason I decided to axe the PyInstaller frozen EXE all together and go with a batch script that will:
The installed plugins can be controlled via the new version of the firefox extension or directly using the
manage_plugins/ endpoint.
The plugins will by be installed under $OCT_BASE_DIR/plugins which by default will be under your user profile (e.g. C:\Users\username.ocr_translate on windows).
If you have trouble with space under C:\ consider setting the OCT_BASE_DIR environment variable to a different location.
The plugin data is stored in a JSON file inside the project plugins_data.json
Version/Scope/Extras of a package to be installed can be controlled via environment variables
(eg to change torch to version A.B.C you would set OCT_PKG_TORCH_VERSION="A.B.C").
If the package name contains a
-
it should be replaced with_min_
in the package nameRemoved env variable AUTOCREATE_VALIDATED_MODELS and relative server initialization.
Now models are created/activated or deactivated via the plugin manager, when the respective plugin is installed/uninstalled.
(see the plugin page for more details)
with chinese).
might not work for every system as there can be underlying failures in the C++ code that the plugin uses.
The version installed can be controlled using the environment variable OCT_PKG_PADDLEPADDLE_VERSION.
Migrating from an older version
As usual, the database will be upgraded automatically to the new version.
For safety, it is suggested to make a copy of it (by default under
%USERPROFILE%/.ocr_translate
) in case you need to downgrade.Already downloaded model can be reused, but the new structure is slightly different, before you would have something like:
Now by default you will have:
OCT_BASE_DIR
is set to)TRANSFORMERS_CACHE
is set to)EASYOCR_PREFIX
is set to)TESSEARCT_PREFIX
is set to)PADDLEOCR_PREFIX
is set to)You can move them manually to mimic the new structure or delete the them and let the server re-download them.
Plugins will be stored under
OCT_BASE_DIR/plugins
(default to%USERPROFILE%/.ocr_translate
)OCT_BASE_DIR/
(default to%USERPROFILE%/.ocr_translate
)The installed python packages divided by scope depending if they are ment to be used for CPU/GPU/BOTH
This folder can go up to several GB when installing torch (huggingface and easyocr) for GPU, so make sure you have enough space.
Fixes
This discussion was created from the release Release v0.6.0.
Beta Was this translation helpful? Give feedback.
All reactions