From 62469d2c812e16ee7c5455697f12e2450477b54a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E7=89=B9=E9=A9=B9?= Date: Wed, 16 Jul 2025 15:59:08 +0800 Subject: [PATCH] =?UTF-8?q?[built-in][PyTorch][OpenFold=5Ffor=5FPyTorch]?= =?UTF-8?q?=20=E4=BF=AE=E6=94=B9=E7=8E=AF=E5=A2=83=E5=87=86=E5=A4=87?= =?UTF-8?q?=E6=B5=81=E7=A8=8B=E4=BB=A5=E5=8F=8A=E7=B2=BE=E5=BA=A6=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E7=9A=84=E8=8E=B7=E5=8F=96=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../others/OpenFold_for_PyTorch/README.md | 18 +++++++++--------- .../install_third_party_dependencies.sh | 5 +---- .../test/val_openfold_8p.sh | 2 +- 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/PyTorch/built-in/others/OpenFold_for_PyTorch/README.md b/PyTorch/built-in/others/OpenFold_for_PyTorch/README.md index 8664ccd3dd..845521cae7 100644 --- a/PyTorch/built-in/others/OpenFold_for_PyTorch/README.md +++ b/PyTorch/built-in/others/OpenFold_for_PyTorch/README.md @@ -49,12 +49,6 @@ - 安装依赖。 - 创建python3.9的conda并激活 - ``` - conda create -n openfold_env python=3.9 - conda activate openfold_env - ``` - 在模型源码包根目录下执行命令,安装模型对应PyTorch版本需要的依赖。 ``` pip install -r 2.1_requirements.txt # PyTorch2.1版本 @@ -67,9 +61,15 @@ pip install git+https://github.com/NVIDIA/dllogger.git pip install torch==2.1.0 - conda install -c bioconda -c conda-forge hhsuite - conda install -c bioconda kalign2 - conda install -c bioconda -c conda-forge mmseqs2 + wget https://github.com/soedinglab/hh-suite/releases/download/v3.3.0/hhsuite-3.3.0-AVX2-Linux.tar.gz + tar xvfz hhsuite-3.3.0-AVX2-Linux.tar.gz + export PATH="$(pwd)/bin:$(pwd)/scripts:$PATH" + + pip install git+https://github.com/TimoLassmann/kalign.git + + wget https://mmseqs.com/latest/mmseqs-linux-avx2.tar.gz + tar xvfz mmseqs-linux-avx2.tar.gz + export PATH=$(pwd)/mmseqs/bin/:$PATH ``` - 构建安装openfold。 diff --git a/PyTorch/built-in/others/OpenFold_for_PyTorch/scripts/install_third_party_dependencies.sh b/PyTorch/built-in/others/OpenFold_for_PyTorch/scripts/install_third_party_dependencies.sh index 4d142a8192..4d79849ad1 100644 --- a/PyTorch/built-in/others/OpenFold_for_PyTorch/scripts/install_third_party_dependencies.sh +++ b/PyTorch/built-in/others/OpenFold_for_PyTorch/scripts/install_third_party_dependencies.sh @@ -12,7 +12,4 @@ ln -rs openfold/resources/stereo_chemical_props.txt tests/test_data/alphafold/co gunzip -c tests/test_data/sample_feats.pickle.gz > tests/test_data/sample_feats.pickle # This setting is used to fix a worker assignment issue during data loading -conda env config vars set KMP_AFFINITY=none - -export LIBRARY_PATH=$CONDA_PREFIX/lib:$LIBRARY_PATH -export LD_LIBRARY_PATH=$CONDA_PREFIX/lib:$LD_LIBRARY_PATH +export KMP_AFFINITY=none diff --git a/PyTorch/built-in/others/OpenFold_for_PyTorch/test/val_openfold_8p.sh b/PyTorch/built-in/others/OpenFold_for_PyTorch/test/val_openfold_8p.sh index 8f352d8b82..750c8598e2 100644 --- a/PyTorch/built-in/others/OpenFold_for_PyTorch/test/val_openfold_8p.sh +++ b/PyTorch/built-in/others/OpenFold_for_PyTorch/test/val_openfold_8p.sh @@ -45,7 +45,7 @@ python3 train_openfold.py $data_path/pdb_data/mmcif_files \ wait # 提取最后一行中的 val/loss 小数值并赋值给变量 -val_loss=$(tac openfold_val_8p.log | grep -m1 'val/loss' | sed -n 's/.*val\/loss[[:space:]]\+\([0-9.]\+\).*/\1/p') +val_loss=$(grep 'val/loss' openfold_val_8p.log | tail -n1 | awk '{print $(NF-1)}') # 输出结果 echo "val/loss: $val_loss" \ No newline at end of file -- Gitee