Installation¶
We recommend Python 3.10+, PyTorch 1.4.0+, and transformers v4.41.0+.
Install with pip¶
OntoAligner is available on the Python Package Index at pypi.org for installation.
pip install -U OntoAligner
The following pip install will installs the latest version of OntoAligner from the main branch of the OntoAligner at GitHub using pip.
pip install git+https://github.com/sciknoworg/OntoAligner.git
Install from Source¶
You can install OntoAligner directly from source to take advantage of the bleeding edge main branch for development.
Clone the repository:
git clone https://github.com/sciknoworg/OntoAligner.git
cd OntoAligner
(Optional but recommended) Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
Install dependencies and the library
pip install -e .
Hint
The -e flag installs the package in editable mode, which is ideal for development—changes in the code reflect immediately.
Install PyTorch with CUDA support¶
To use a GPU/CUDA for aligner models, you must install PyTorch with CUDA support. Follow PyTorch - Get Started for installation steps. We recommend also installing the PEFT library if you plan to perform parameter-efficient fine-tuning or run inference with models fine-tuned using PEFT.