Installing OpenFold Locally on O2
Set Up for Install
First, start an interactive session that uses GPU resources (Using O2 GPU resources) :
$ srun --pty -p gpu --gres=gpu:1 -t 0-05:00 --mem 24G -c 4 bashLoad modules needed for later steps:
$ module load miniforge3/24.11.3-0Navigate to the directory you would like to install OpenFold in and clone the repository, or download a release tarball from the Releases page:
$ git clone https://github.com/aqlaboratory/openfold.git
$ cd openfold
$ openfold_dir=$PWDInstall OpenFold and Parameter Files
While inside the OpenFold directory, create a Conda (Conda on O2) environment. In this example the name of the environment we will create is openfold_test. This can be changed here, but it will carry over to other options in some later steps.
$ conda env create --name=openfold_test -f environment.ymlActivate this new environment using the command
$ conda activate openfold_testThe prompt inside the terminal should change to contain the Conda environment name in parenthesis, in this case (openfold_test). Now, you may generally follow the rest of the instructions in https://github.com/aqlaboratory/openfold/blob/main/docs/source/Installation.md .
scripts/install_third_party_dependencies.sh
# this will eventually tell you to reactivate the environment
conda deactivate
conda activate openfold_test
./scripts/download_alphafold_params.sh /path/to/openfold/resources
./scripts/download_openfold_params.sh /path/to/openfold/resources
./scripts/download_openfold_soloseq_params.sh /path/to/openfold/resources/path/to/openfold/resources should be located where the openfold package was installed to. In a conda environment, this will be $CONDA_PREFIX/lib/python3.10/site-packages/[SOMEPACKAGENAME_WITH_openfold_IN_IT]/openfold/resources. For example, if using the 2.2.0 release tarball of OpenFold, the path will look like $CONDA_PREFIX/lib/python3.10/site-packages/openfold-2.2.0-py3.10-linux-x86_64.egg/openfold/resources.
If at any point you encounter errors related to NVIDIA drivers, you may need to repeat the installation process while on a GPU node (with an allocated GPU resource). The preliminary instructions involved requesting such a resource, but if this was skipped in favor of a generic interactive session, it will be necessary to request a new one. This will require removal of the previous environment, which can be done with:
#while environment is active:
conda_dir=$CONDA_PREFIX
conda deactivate
rm -rf $conda_dirOr you may simply echo $CONDA_PREFIX, then copy/paste that path into your rm -rf command after deactivating the environment. You can also let conda handle the deletion:
conda env remove -n openfold_test