Skip to content

Commit

Permalink
Simplify installation instructions (#2)
Browse files Browse the repository at this point in the history
* Add initial conda env and GitHub Actions workflow

* Add PyTorch cpuonly
Without cpuonly the pinned version of openfold fails to
install because it attempts to parse the CUDA version.
Only newer versions of openfold check for CPU environments

* Skip installing openfold
Even with cpuonly, cudatoolkit still installed. Likely due to known
PyG packaging problems reported in their GitHub issues.

* Install fair-esm outside conda
Can't use pip with --no-deps otherwise
https://stackoverflow.com/questions/75164677/pip-install-with-no-deps-in-conda-environment-yml

* Temporarily skip dllogger

* Install cudatoolkit from nvidia channel

* Try older pip to workaround functools lru_cache
Not perfectly compatible with Python 3.7

* Test ProteinDT import
Add back dllogger

* Test importing code that exists
  • Loading branch information
agitter authored Jul 20, 2024
1 parent 80938f2 commit 8006b65
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Tests
on:
- push
- pull_request

jobs:
# Installs the conda environment and ProteinDT package
install:
name: Test ProteinDT installation
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# Could also test on the beta M1 macOS or other runners
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories
os:
- ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
# Use mamba instead of conda
- name: Install conda environment
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: ProteinDT
environment-file: environment.yml
auto-activate-base: false
miniforge-variant: Mambaforge
miniforge-version: 'latest'
use-mamba: true
# Installs fair-esm package into the activated conda environment without dependencies
- name: Install fair-esm
shell: bash --login {0}
run: pip install fair-esm[esmfold]==2.0.0 --no-dependencies # Override deepspeed==0.5
# Installs ProteinDT package into the activated conda environment
- name: Install ProteinDT
shell: bash --login {0}
run: pip install .
# Log conda environment contents
- name: Log conda environment
shell: bash --login {0}
run: conda list
- name: Test ProteinDT import
shell: bash --login {0}
run: python -c 'from ProteinDT.models.model_ProteinText import ProteinTextModel'
32 changes: 32 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: ProteinDT
channels:
- conda-forge
dependencies:
- python=3.7
- pip=18
- numpy
- networkx
- scikit-learn
- pytorch::pytorch=1.10
- nvidia::cudatoolkit # pyg installs cudatoolkit even if cpuonly is requested
- transformers
- lxml
- lmdb # for TAPE
- seqeval
- openai # for baseline ChatGPT
- accelerate # for baseline Galactica
- matplotlib # for visualization
- h5py # for binding editing
- biopython
- pyg::pyg=2.0
- pyg::pytorch-scatter
- pyg::pytorch-sparse
- pyg::pytorch-cluster
- dm-tree # for ESM folding
- omegaconf
- ml-collections
- einops
- mdtraj
- pip:
- git+https://github.com/NVIDIA/dllogger@0540a43971f4a8a16693a9de9de73c1072020769
# - git+https://github.com/aqlaboratory/openfold@4b41059694619831a7db195b7e0988fc4ff3a307

0 comments on commit 8006b65

Please sign in to comment.