-
Notifications
You must be signed in to change notification settings - Fork 23
Installation
We recommend to use virtualenv when possible, especially when dealing distributed systems such as SLURM.
So if you are using conda, make sure to exit your environment via conda deactivate. While you could install DeepBLAST / TMvec within a conda environment, we have run into problems when running distributed training, so use at your own risk.
You can create a new virtual environment via
python3 -m venv tmvec
This will create a folder called tmvec, and all install scripts will be installed there. The install script location can be placed anywhere on your system (sometimes useful on distributed systems).
Once the virtualenv is created, you can activate your environment and install everything as follows.
For more details on pytorch versions, see the pytorch instructions
If you don't have a GPU, make sure to instead install faiss via pip install faiss-cpu
Then, the latest versions of DeepBLAST and TMvec can be installed as follows.
pip install git+https://github.com/flatironinstitute/deepblast.git
pip install git+https://github.com/tymor22/tm-vec.gitIf you have a GPU available, you can take advantage of accelerated database building, search and alignment.
This can be done as follows
pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu116
pip3 install faiss-gpu
DeepBLAST uses Numba in order to compute alignments on the GPU. As a result, Numba can be finicky regarding the GPU setup.
Sometimes, it is sufficient to use the locally installed cudatoolkit. If your compute cluster has it installed, it may be a matter of loading the modules. The command that we used on our slurm cluster was module load gcc cudnn cuda, but this may vary depending on the cluster.
If you are installing this on your local machine, you may need to rewire some paths, namely manually installing nvidia drivers and the cudatoolkit. On Ubuntu, the cuda-toolkit can be installed via
sudo apt-get install nvidia-cuda-toolkit
However, this isn't enough, since Numba has default paths defined for searching for the cuda-toolkit, so you may need to override CUDA_HOME.
For instance, on my Ubuntu machine, I ran
export CUDA_HOME=/usr/local/cuda-11.3