install_third_party_dependencies.sh 1.4 KB
Newer Older
Gustaf Ahdritz's avatar
Gustaf Ahdritz committed
1
#!/bin/bash
2
CONDA_INSTALL_URL=${CONDA_INSTALL_URL:-"https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh"}
Gustaf Ahdritz's avatar
Gustaf Ahdritz committed
3

Gustaf Ahdritz's avatar
Gustaf Ahdritz committed
4
5
source scripts/vars.sh

Gustaf Ahdritz's avatar
Gustaf Ahdritz committed
6
7
# Install Miniconda locally
rm -rf lib/conda
8
rm -f /tmp/Miniconda3-latest-Linux-x86_64.sh
Karl Leswing's avatar
Karl Leswing committed
9
10
wget -P /tmp \
    "${CONDA_INSTALL_URL}" \
Gustaf Ahdritz's avatar
Gustaf Ahdritz committed
11
12
13
14
    && bash /tmp/Miniconda3-latest-Linux-x86_64.sh -b -p lib/conda \
    && rm /tmp/Miniconda3-latest-Linux-x86_64.sh

# Grab conda-only packages
Karl Leswing's avatar
Karl Leswing committed
15
export PATH=lib/conda/bin:$PATH
16
lib/conda/bin/python3 -m pip install nvidia-pyindex
Karl Leswing's avatar
Karl Leswing committed
17
conda env create --name=${ENV_NAME} -f environment.yml
18
source activate ${ENV_NAME}
Marta's avatar
Marta committed
19

Gustaf Ahdritz's avatar
Gustaf Ahdritz committed
20
21
# Install DeepMind's OpenMM patch
OPENFOLD_DIR=$PWD
22
pushd lib/conda/envs/$ENV_NAME/lib/python3.7/site-packages/ \
Gustaf Ahdritz's avatar
Gustaf Ahdritz committed
23
24
25
26
    && patch -p0 < $OPENFOLD_DIR/lib/openmm.patch \
    && popd

# Download folding resources
Gustaf Ahdritz's avatar
Gustaf Ahdritz committed
27
wget -q -P openfold/resources \
Gustaf Ahdritz's avatar
Gustaf Ahdritz committed
28
29
    https://git.scicore.unibas.ch/schwede/openstructure/-/raw/7102c63615b64735c4941278d92b554ec94415f8/modules/mol/alg/src/stereo_chemical_props.txt

30
31
# Certain tests need access to this file
mkdir -p tests/test_data/alphafold/common
32
ln -rs openfold/resources/stereo_chemical_props.txt tests/test_data/alphafold/common
33

Gustaf Ahdritz's avatar
Gustaf Ahdritz committed
34
35
36
37
38
echo "Downloading OpenFold parameters..."
bash scripts/download_openfold_params.sh openfold/resources

echo "Downloading AlphaFold parameters..."
bash scripts/download_alphafold_params.sh openfold/resources
Gustaf Ahdritz's avatar
Gustaf Ahdritz committed
39
40
41

# Decompress test data
gunzip tests/test_data/sample_feats.pickle.gz