【AI study】ESMFold安装
完整版安装流程
- 容易踩坑的点
- 1. cuda和cudnn版本安装
- 2. deepspeed要安装0.5.9
- 操作步骤
- 0. 安装CUDA和cudnn
- 1. 环境配置(严格遵守版本3.7要求)
- 2. 安装指定版本的PyTorch和CUDA工具包
- 3. ESMFold核心组件安装
- 使用国内镜像加速安装
- 4. 安装openfold
由于ESMfold安装依赖python3.7,这两天踩了很多坑终于安装好了,记录一下。
容易踩坑的点
1. cuda和cudnn版本安装
ESMfold依赖的cuda版本是11.x,但是要安装11.8,否则安装openfold会出现问题。
cudnn安装11.x对应的即可,我安装的是8.9.5,gcc版本是9.3
2. deepspeed要安装0.5.9
这个不多说了,只要python3.7下安装好cuda和cudnn就不会遇到问题
操作步骤
0. 安装CUDA和cudnn
网上搜一下CUDA11.8安装就有相应的教程了
1. 环境配置(严格遵守版本3.7要求)
conda create -n esmfold_env python=3.7 -y
conda activate esmfold_env
2. 安装指定版本的PyTorch和CUDA工具包
conda install pytorch==1.12.0 torchvision==0.13.0 torchaudio==0.12.0 cudatoolkit=11.3 -c pytorch
3. ESMFold核心组件安装
使用国内镜像加速安装
pip install "fair-esm[esmfold]" -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install git+https://gitclone.com/github.com/NVIDIA/dllogger.git
4. 安装openfold
git clone https://github.com/aqlaboratory/openfold.git
cd openfold
git checkout 4b41059694619831a7db195b7e0988fc4ff3a307 # 切换到指定提交
pip install .
基本上不会出问题。
列出requirements:
absl-py==2.1.0
aiohttp==3.8.6
aiosignal==1.3.1
antlr4-python3-runtime==4.9.3
async-timeout==4.0.3
asynctest==0.13.0
attrs==24.2.0
biopython==1.79
biotite==0.40.0
brotlipy==0.7.0
certifi @ file:///croot/certifi_1671487769961/work/certifi
cffi @ file:///croot/cffi_1670423208954/work
charset-normalizer @ file:///tmp/build/80754af9/charset-normalizer_1630003229654/work
contextlib2==21.6.0
cryptography @ file:///croot/cryptography_1677533068310/work
deepspeed==0.5.9
DLLogger==1.1.0
dm-tree==0.1.8
einops==0.6.1
fair-esm==2.0.0
flit_core @ file:///opt/conda/conda-bld/flit-core_1644941570762/work/source/flit_core
frozenlist==1.3.3
fsspec==2023.1.0
hjson==3.1.0
idna @ file:///croot/idna_1666125576474/work
importlib-metadata==6.7.0
lightning-utilities==0.10.1
mkl-fft==1.3.1
mkl-random @ file:///tmp/build/80754af9/mkl_random_1626179032232/work
mkl-service==2.4.0
ml-collections==0.1.1
msgpack==1.0.5
multidict==6.0.5
networkx==2.6.3
ninja==1.11.1.4
numpy @ file:///opt/conda/conda-bld/numpy_and_numpy_base_1653915516269/work
omegaconf==2.3.0
openfold @ file:///home/wangkelin/software/openfold
packaging==24.0
Pillow==9.4.0
psutil==7.0.0
py-cpuinfo==9.0.0
pycparser @ file:///tmp/build/80754af9/pycparser_1636541352034/work
pyOpenSSL @ file:///croot/pyopenssl_1677607685877/work
PySocks @ file:///tmp/build/80754af9/pysocks_1594394576006/work
pytorch-lightning==1.9.5
PyYAML==6.0.1
requests @ file:///opt/conda/conda-bld/requests_1657734628632/work
scipy==1.7.3
six @ file:///tmp/build/80754af9/six_1644875935023/work
torch==1.12.0
torchaudio==0.12.0
torchmetrics==0.11.4
torchvision==0.13.0
tqdm==4.67.1
triton==1.0.0
typing_extensions @ file:///croot/typing_extensions_1669924550328/work
urllib3 @ file:///croot/urllib3_1673575502006/work
yarl==1.9.4
zipp==3.15.0