facebookresearch / esm

Evolutionary Scale Modeling (esm): Pretrained language models for proteins
MIT License
3.16k stars 627 forks source link

ESM-IF1 installation #473

Closed sahakyanhk closed 1 year ago

sahakyanhk commented 1 year ago

Bug description I am trying to install and run inverse folding. I started a new conda environment from scratch as recommended and installed the required packages. During the installation no issues were reported, but I got this CUDA compatibility issues:

import esm.inverse_folding Traceback (most recent call last): File "", line 1, in File "/data/saakyanh2/miniconda3/envs/inverse/lib/python3.9/site-packages/esm/inverse_folding/init.py", line 6, in from . import gvp_transformer File "/data/saakyanh2/miniconda3/envs/inverse/lib/python3.9/site-packages/esm/inverse_folding/gvp_transformer.py", line 16, in from .features import DihedralFeatures File "/data/saakyanh2/miniconda3/envs/inverse/lib/python3.9/site-packages/esm/inverse_folding/features.py", line 73, in from .gvp_modules import GVP, LayerNorm File "/data/saakyanh2/miniconda3/envs/inverse/lib/python3.9/site-packages/esm/inverse_folding/gvp_modules.py", line 33, in from torch_geometric.nn import MessagePassing File "/data/saakyanh2/miniconda3/envs/inverse/lib/python3.9/site-packages/torch_geometric/init.py", line 4, in import torch_geometric.data File "/data/saakyanh2/miniconda3/envs/inverse/lib/python3.9/site-packages/torch_geometric/data/init.py", line 1, in from .data import Data File "/data/saakyanh2/miniconda3/envs/inverse/lib/python3.9/site-packages/torch_geometric/data/data.py", line 20, in from torch_sparse import SparseTensor File "/data/saakyanh2/miniconda3/envs/inverse/lib/python3.9/site-packages/torch_sparse/init.py", line 18, in torch.ops.load_library(spec.origin) File "/data/saakyanh2/miniconda3/envs/inverse/lib/python3.9/site-packages/torch/_ops.py", line 255, in load_library ctypes.CDLL(path) File "/data/saakyanh2/miniconda3/envs/inverse/lib/python3.9/ctypes/init.py", line 382, in init self._handle = _dlopen(self._name, mode) OSError: /gpfs/gsfs6/users/saakyanh2/miniconda3/envs/inverse/lib/python3.9/site-packages/torch_sparse/_version_cuda.so: undefined symbol: _ZN5torch3jit17parseSchemaOrNameERKSs

I was able to install the package on google colab but in that case, GPU was not supported.

tomsercu commented 1 year ago

Sounds like a pytorch cuda version mismatch, doesn't it come up even if you just initialize a torch tensor and move it to GPU? In any case the place to look is for a mismatch between the cuda driver on your system being older than the cuda version you installed pytorch with; you should make a new conda environment and then carefully pick the pytorch installer matching your cuda version (which you can find out with a command like nvcc --version)