diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..d3fe1a9 --- /dev/null +++ b/.github/workflows/test.yml @@ -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' diff --git a/environment.yml b/environment.yml new file mode 100644 index 0000000..dbe2347 --- /dev/null +++ b/environment.yml @@ -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