From 20a820639f79fe4b9112a52c085f06de9e4025f9 Mon Sep 17 00:00:00 2001 From: YoshitakaMo Date: Thu, 9 Mar 2023 14:22:08 +0900 Subject: [PATCH] use python3.9 (Google Colab compatibility) --- README.md | 1 + beta_install_colabbatch_linux.sh | 18 +++++++++--------- beta_update_linux.sh | 2 +- install_colabbatch_M1mac.sh | 24 ++++++++++++------------ install_colabbatch_intelmac.sh | 16 ++++++++-------- install_colabbatch_linux.sh | 19 ++++++++++--------- 6 files changed, 41 insertions(+), 39 deletions(-) diff --git a/README.md b/README.md index 6ea830d..f49a0b9 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,7 @@ See also Change log: https://github.com/sokrypton/ColabFold/wiki/v1.5.0 ## New Updates +- 09Mar2023, version 1.5.2 released. The base directory has been changed to `localcolabfold` from `colabfold_batch` to distinguish it from the execution command. - 05Feb2023, version 1.5.0-pre released. - 16Jun2022, version 1.4.0 released. See [Release v1.4.0](https://github.com/YoshitakaMo/localcolabfold/releases/tag/v1.4.0) - 07May2022, **Updated `update_linux.sh`.** See also [How to update](#how-to-update). Please use a new option `--use-gpu-relax` if GPU relaxation is required (recommended). diff --git a/beta_install_colabbatch_linux.sh b/beta_install_colabbatch_linux.sh index 08cbc0e..28afe15 100644 --- a/beta_install_colabbatch_linux.sh +++ b/beta_install_colabbatch_linux.sh @@ -4,7 +4,7 @@ type wget || { echo "wget command is not installed. Please install it at first u type curl || { echo "curl command is not installed. Please install it at first using apt or yum. " ; exit 1 ; } CURRENTPATH=`pwd` -COLABFOLDDIR="${CURRENTPATH}/colabfold_batch" +COLABFOLDDIR="${CURRENTPATH}/localcolabfold" mkdir -p ${COLABFOLDDIR} cd ${COLABFOLDDIR} @@ -13,30 +13,30 @@ bash ./Miniconda3-latest-Linux-x86_64.sh -b -p ${COLABFOLDDIR}/conda rm Miniconda3-latest-Linux-x86_64.sh . "${COLABFOLDDIR}/conda/etc/profile.d/conda.sh" export PATH="${COLABFOLDDIR}/conda/condabin:${PATH}" -conda create -p $COLABFOLDDIR/colabfold-conda python=3.8 -y +conda create -p $COLABFOLDDIR/colabfold-conda python=3.9 -y conda activate $COLABFOLDDIR/colabfold-conda conda update -n base conda -y -conda install -c conda-forge python=3.8 cudnn==8.2.1.32 cudatoolkit==11.1.1 openmm==7.5.1 pdbfixer -y +conda install -c conda-forge python=3.9 cudnn==8.2.1.32 cudatoolkit==11.1.1 openmm==7.5.1 pdbfixer -y # Download the updater wget -qnc https://raw.githubusercontent.com/YoshitakaMo/localcolabfold/main/update_linux.sh --no-check-certificate chmod +x update_linux.sh # install alignment tools conda install -c conda-forge -c bioconda kalign2=2.04 hhsuite=3.3.0 mmseqs2=14.7e284 -y # install ColabFold and Jaxlib -# colabfold-conda/bin/python3.8 -m pip install "colabfold[alphafold] @ git+https://github.com/sokrypton/ColabFold" -colabfold-conda/bin/python3.8 -m pip install -q --no-warn-conflicts "colabfold[alphafold-minus-jax] @ git+https://github.com/sokrypton/ColabFold@beta" -colabfold-conda/bin/python3.8 -m pip install https://storage.googleapis.com/jax-releases/cuda11/jaxlib-0.3.25+cuda11.cudnn82-cp38-cp38-manylinux2014_x86_64.whl -colabfold-conda/bin/python3.8 -m pip install jax==0.3.25 biopython==1.79 +# colabfold-conda/bin/python3.9 -m pip install "colabfold[alphafold] @ git+https://github.com/sokrypton/ColabFold" +colabfold-conda/bin/python3.9 -m pip install -q --no-warn-conflicts "colabfold[alphafold-minus-jax] @ git+https://github.com/sokrypton/ColabFold@beta" +colabfold-conda/bin/python3.9 -m pip install https://storage.googleapis.com/jax-releases/cuda11/jaxlib-0.3.25+cuda11.cudnn82-cp39-cp39-manylinux2014_x86_64.whl +colabfold-conda/bin/python3.9 -m pip install jax==0.3.25 biopython==1.79 # Use 'Agg' for non-GUI backend -cd ${COLABFOLDDIR}/colabfold-conda/lib/python3.8/site-packages/colabfold +cd ${COLABFOLDDIR}/colabfold-conda/lib/python3.9/site-packages/colabfold sed -i -e "s#from matplotlib import pyplot as plt#import matplotlib\nmatplotlib.use('Agg')\nimport matplotlib.pyplot as plt#g" plot.py # modify the default params directory sed -i -e "s#appdirs.user_cache_dir(__package__ or \"colabfold\")#\"${COLABFOLDDIR}/colabfold\"#g" download.py # start downloading weights cd ${COLABFOLDDIR} -colabfold-conda/bin/python3.8 -m colabfold.download +colabfold-conda/bin/python3.9 -m colabfold.download cd ${CURRENTPATH} echo "Download of alphafold2 weights finished." diff --git a/beta_update_linux.sh b/beta_update_linux.sh index 5db8cf4..54a8c50 100644 --- a/beta_update_linux.sh +++ b/beta_update_linux.sh @@ -21,7 +21,7 @@ python3.8 -m pip uninstall alphafold-colabfold -y python3.8 -m pip install --no-warn-conflicts "colabfold[alphafold-minus-jax] @ git+https://github.com/sokrypton/ColabFold@beta" # use 'agg' for non-GUI backend -pushd ${COLABFOLDDIR}/colabfold-conda/lib/python3.8/site-packages/colabfold +pushd ${COLABFOLDDIR}/colabfold-conda/lib/python3.9/site-packages/colabfold sed -i -e "s#from matplotlib import pyplot as plt#import matplotlib\nmatplotlib.use('Agg')\nimport matplotlib.pyplot as plt#g" plot.py sed -i -e "s#appdirs.user_cache_dir(__package__ or \"colabfold\")#\"${COLABFOLDDIR}/colabfold\"#g" download.py popd diff --git a/install_colabbatch_M1mac.sh b/install_colabbatch_M1mac.sh index 5cef87f..bf14387 100755 --- a/install_colabbatch_M1mac.sh +++ b/install_colabbatch_M1mac.sh @@ -28,33 +28,33 @@ else fi CURRENTPATH=`pwd` -COLABFOLDDIR="${CURRENTPATH}/colabfold_batch" +COLABFOLDDIR="${CURRENTPATH}/localcolabfold" mkdir -p ${COLABFOLDDIR} cd ${COLABFOLDDIR} . "/opt/homebrew/Caskroom/miniforge/base/etc/profile.d/conda.sh" -conda create -p $COLABFOLDDIR/colabfold-conda python=3.8 -y +conda create -p $COLABFOLDDIR/colabfold-conda python=3.9 -y conda activate $COLABFOLDDIR/colabfold-conda conda update -n base conda -y -conda install -y -c conda-forge python=3.8 openmm==7.5.1 pdbfixer jupyter matplotlib py3Dmol tqdm biopython==1.79 immutabledict==2.0.0 +conda install -y -c conda-forge python=3.9 openmm==7.5.1 pdbfixer jupyter matplotlib py3Dmol tqdm biopython==1.79 immutabledict==2.0.0 conda install -y -c apple tensorflow-deps # Download the updater wget -qnc https://raw.githubusercontent.com/YoshitakaMo/localcolabfold/main/update_M1mac.sh --no-check-certificate chmod +x update_M1mac.sh # install ColabFold and Jaxlib -colabfold-conda/bin/python3.8 -m pip install https://files.pythonhosted.org/packages/bd/57/88cea9e14dacaea82ca86fac2bf6ecb8b7fd99622d776e4131786ce5b65e/tensorflow_macos-2.7.0-cp38-cp38-macosx_11_0_arm64.whl -colabfold-conda/bin/python3.8 -m pip install git+https://github.com/deepmind/tree.git -colabfold-conda/bin/python3.8 -m pip install git+https://github.com/google/ml_collections.git -colabfold-conda/bin/python3.8 -m pip install dm-haiku appdirs pandas absl-py docker -colabfold-conda/bin/python3.8 -m pip install alphafold-colabfold --no-deps --no-color -colabfold-conda/bin/python3.8 -m pip install "colabfold[alphafold] @ git+https://github.com/sokrypton/ColabFold" --no-deps --no-color -colabfold-conda/bin/python3.8 -m pip install jaxlib==0.3.25 --no-deps --no-color -colabfold-conda/bin/python3.8 -m pip install jax==0.3.25 chex scipy toolz --no-deps --no-color +colabfold-conda/bin/python3.9 -m pip install https://files.pythonhosted.org/packages/bd/57/88cea9e14dacaea82ca86fac2bf6ecb8b7fd99622d776e4131786ce5b65e/tensorflow_macos-2.7.0-cp38-cp38-macosx_11_0_arm64.whl +colabfold-conda/bin/python3.9 -m pip install git+https://github.com/deepmind/tree.git +colabfold-conda/bin/python3.9 -m pip install git+https://github.com/google/ml_collections.git +colabfold-conda/bin/python3.9 -m pip install dm-haiku appdirs pandas absl-py docker +colabfold-conda/bin/python3.9 -m pip install alphafold-colabfold --no-deps --no-color +colabfold-conda/bin/python3.9 -m pip install "colabfold[alphafold] @ git+https://github.com/sokrypton/ColabFold" --no-deps --no-color +colabfold-conda/bin/python3.9 -m pip install jaxlib==0.3.25 --no-deps --no-color +colabfold-conda/bin/python3.9 -m pip install jax==0.3.25 chex scipy toolz --no-deps --no-color # start downloading weights cd ${COLABFOLDDIR} -colabfold-conda/bin/python3.8 -m colabfold.download +colabfold-conda/bin/python3.9 -m colabfold.download cd ${CURRENTPATH} echo "Download of alphafold2 weights finished." diff --git a/install_colabbatch_intelmac.sh b/install_colabbatch_intelmac.sh index b58d177..8a12437 100755 --- a/install_colabbatch_intelmac.sh +++ b/install_colabbatch_intelmac.sh @@ -25,7 +25,7 @@ else fi CURRENTPATH=`pwd` -COLABFOLDDIR="${CURRENTPATH}/colabfold_batch" +COLABFOLDDIR="${CURRENTPATH}/localcolabfold" mkdir -p ${COLABFOLDDIR} cd ${COLABFOLDDIR} @@ -34,22 +34,22 @@ bash ./Miniconda3-latest-MacOSX-x86_64.sh -b -p ${COLABFOLDDIR}/conda rm Miniconda3-latest-MacOSX-x86_64.sh . "${COLABFOLDDIR}/conda/etc/profile.d/conda.sh" export PATH="${COLABFOLDDIR}/conda/condabin:${PATH}" -conda create -p $COLABFOLDDIR/colabfold-conda python=3.8 -y +conda create -p $COLABFOLDDIR/colabfold-conda python=3.9 -y conda activate $COLABFOLDDIR/colabfold-conda conda update -n base conda -y -conda install -c conda-forge python=3.8 openmm==7.5.1 pdbfixer -y +conda install -c conda-forge python=3.9 openmm==7.5.1 pdbfixer -y # Download the updater wget -qnc https://raw.githubusercontent.com/YoshitakaMo/localcolabfold/main/update_intelmac.sh --no-check-certificate chmod +x update_intelmac.sh # install ColabFold and Jaxlib -colabfold-conda/bin/python3.8 -m pip install "colabfold[alphafold] @ git+https://github.com/sokrypton/ColabFold" -colabfold-conda/bin/python3.8 -m pip install jaxlib==0.3.25 -colabfold-conda/bin/python3.8 -m pip install jax==0.3.25 -colabfold-conda/bin/python3.8 -m pip install biopython==1.79 +colabfold-conda/bin/python3.9 -m pip install "colabfold[alphafold] @ git+https://github.com/sokrypton/ColabFold" +colabfold-conda/bin/python3.9 -m pip install jaxlib==0.3.25 +colabfold-conda/bin/python3.9 -m pip install jax==0.3.25 +colabfold-conda/bin/python3.9 -m pip install biopython==1.79 # start downloading weights cd ${COLABFOLDDIR} -colabfold-conda/bin/python3.8 -m colabfold.download +colabfold-conda/bin/python3.9 -m colabfold.download cd ${CURRENTPATH} echo "Download of alphafold2 weights finished." diff --git a/install_colabbatch_linux.sh b/install_colabbatch_linux.sh index 440eb5d..bca66b1 100755 --- a/install_colabbatch_linux.sh +++ b/install_colabbatch_linux.sh @@ -4,7 +4,7 @@ type wget || { echo "wget command is not installed. Please install it at first u type curl || { echo "curl command is not installed. Please install it at first using apt or yum. " ; exit 1 ; } CURRENTPATH=`pwd` -COLABFOLDDIR="${CURRENTPATH}/colabfold_batch" +COLABFOLDDIR="${CURRENTPATH}/localcolabfold" mkdir -p ${COLABFOLDDIR} cd ${COLABFOLDDIR} @@ -13,23 +13,24 @@ bash ./Miniconda3-latest-Linux-x86_64.sh -b -p ${COLABFOLDDIR}/conda rm Miniconda3-latest-Linux-x86_64.sh . "${COLABFOLDDIR}/conda/etc/profile.d/conda.sh" export PATH="${COLABFOLDDIR}/conda/condabin:${PATH}" -conda create -p $COLABFOLDDIR/colabfold-conda python=3.8 -y +conda create -p $COLABFOLDDIR/colabfold-conda python=3.9 -y conda activate $COLABFOLDDIR/colabfold-conda conda update -n base conda -y -conda install -c conda-forge python=3.8 cudnn==8.2.1.32 cudatoolkit==11.1.1 openmm==7.5.1 pdbfixer -y +conda install -c conda-forge python=3.9 cudnn==8.2.1.32 cudatoolkit==11.1.1 openmm==7.5.1 pdbfixer -y # Download the updater wget -qnc https://raw.githubusercontent.com/YoshitakaMo/localcolabfold/main/update_linux.sh --no-check-certificate chmod +x update_linux.sh # install alignment tools conda install -c conda-forge -c bioconda kalign2=2.04 hhsuite=3.3.0 mmseqs2=14.7e284 -y # install ColabFold and Jaxlib -# colabfold-conda/bin/python3.8 -m pip install "colabfold[alphafold] @ git+https://github.com/sokrypton/ColabFold" -colabfold-conda/bin/python3.8 -m pip install -q --no-warn-conflicts "colabfold[alphafold-minus-jax] @ git+https://github.com/sokrypton/ColabFold" -colabfold-conda/bin/python3.8 -m pip install https://storage.googleapis.com/jax-releases/cuda11/jaxlib-0.3.25+cuda11.cudnn82-cp38-cp38-manylinux2014_x86_64.whl -colabfold-conda/bin/python3.8 -m pip install jax==0.3.25 biopython==1.79 +# colabfold-conda/bin/python3.9 -m pip install "colabfold[alphafold] @ git+https://github.com/sokrypton/ColabFold" +colabfold-conda/bin/python3.9 -m pip install --upgrade pip +colabfold-conda/bin/python3.9 -m pip install --no-warn-conflicts "colabfold[alphafold-minus-jax] @ git+https://github.com/sokrypton/ColabFold" +colabfold-conda/bin/python3.9 -m pip install https://storage.googleapis.com/jax-releases/cuda11/jaxlib-0.3.25+cuda11.cudnn82-cp39-cp39-manylinux2014_x86_64.whl +colabfold-conda/bin/python3.9 -m pip install jax==0.3.25 biopython==1.79 # Use 'Agg' for non-GUI backend -cd ${COLABFOLDDIR}/colabfold-conda/lib/python3.8/site-packages/colabfold +cd ${COLABFOLDDIR}/colabfold-conda/lib/python3.9/site-packages/colabfold sed -i -e "s#from matplotlib import pyplot as plt#import matplotlib\nmatplotlib.use('Agg')\nimport matplotlib.pyplot as plt#g" plot.py # modify the default params directory sed -i -e "s#appdirs.user_cache_dir(__package__ or \"colabfold\")#\"${COLABFOLDDIR}/colabfold\"#g" download.py @@ -38,7 +39,7 @@ rm -rf __pycache__ # start downloading weights cd ${COLABFOLDDIR} -colabfold-conda/bin/python3.8 -m colabfold.download +colabfold-conda/bin/python3.9 -m colabfold.download cd ${CURRENTPATH} echo "Download of alphafold2 weights finished."