mirror of
https://github.com/KosinskiLab/AlphaPulldown.git
synced 2026-06-04 14:14:24 +08:00
* symmetrical refactoring to support both af2 and af3 data pipelines * Clean tests * Keep GPU tests in place * Reverted accidentally deleted templates * Add AlphaFold3 feature creation pipeline and per-chain input generation - Implement `create_pipeline_af3` to construct the AlphaFold3 data pipeline with correct database and binary paths. - Add `create_af3_individual_features` to generate AlphaFold3 input features for each chain in a FASTA, handling protein, RNA, and DNA sequences. - Integrate new AF3 logic into the main entry point, dispatching to AF2 or AF3 as appropriate. - Ensure output directory creation and error handling for missing dependencies or invalid sequences. * Convert template dates to datetime for af3 * First check for nucleotides, then for amino-acids * Skip existing features json if --skip_existing=true * Check if DNA before RNA * Bump 2.1.0 * Git ignore build/ dir
187 lines
6.3 KiB
YAML
187 lines
6.3 KiB
YAML
name: AlphaPulldown-CI-CD
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- main
|
|
release:
|
|
types: [published]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build-and-test:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
python-version: ["3.10", "3.11"]
|
|
install-type: ["user", "developer"]
|
|
|
|
defaults:
|
|
run:
|
|
shell: bash -el {0}
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
submodules: recursive
|
|
|
|
- uses: conda-incubator/setup-miniconda@v3
|
|
with:
|
|
environment-file: environment.yml
|
|
activate-environment: AlphaPulldown
|
|
python-version: ${{ matrix.python-version }}
|
|
auto-update-conda: true
|
|
use-mamba: true
|
|
|
|
- if: matrix.install-type == 'user'
|
|
run: |
|
|
pip install alphapulldown
|
|
pip install -U "jax[cuda12]"==0.5.3
|
|
|
|
- if: matrix.install-type == 'developer'
|
|
run: |
|
|
pip install .
|
|
pip install -U "jax[cuda12]"==0.5.3
|
|
# export PYTHONPATH=$PWD/AlphaLink2:$PYTHONPATH
|
|
# install dependencies for AlphaLink backend
|
|
# pip install torch==1.13.0+cu117 --extra-index-url https://download.pytorch.org/whl/cu117
|
|
# pip install setuptools==69.5.1 # Downgrade setuptools to avoid crashes when installing unicore
|
|
# git clone https://github.com/dptech-corp/Uni-Core.git
|
|
# cd Uni-Core
|
|
# python setup.py install --disable-cuda-ext
|
|
# cd ..
|
|
- run: |
|
|
pytest test/
|
|
#export PYTHONPATH=$PWD/alphapulldown/analysis_pipeline:$PYTHONPATH
|
|
## Test analysis pipeline
|
|
#conda install -c bioconda biopandas
|
|
#pip install pyrosetta-installer
|
|
#python -c 'import pyrosetta_installer; pyrosetta_installer.install_pyrosetta()'
|
|
#pytest -s test/test_pdb_analyser.py
|
|
#pytest -s test/test_get_good_inter_pae.py
|
|
|
|
build-fold-container:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: webfactory/ssh-agent@v0.9.0
|
|
with:
|
|
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
|
|
- uses: actions/checkout@v4
|
|
- run: rm -rf /opt/hostedtoolcache
|
|
- uses: docker/login-action@v3
|
|
with:
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
- uses: docker/setup-buildx-action@v3
|
|
- name: Build and push fold container
|
|
if: github.event_name == 'push'
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
file: ./docker/pulldown.dockerfile
|
|
push: true
|
|
tags: ${{ secrets.DOCKER_USERNAME }}/fold:latest
|
|
ssh: default
|
|
- name: Build and push fold container with version
|
|
if: github.event_name == 'release' && github.event.action == 'published'
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
file: ./docker/pulldown.dockerfile
|
|
push: true
|
|
tags: ${{ secrets.DOCKER_USERNAME }}/fold:${{ github.event.release.tag_name }}
|
|
ssh: default
|
|
|
|
build-alphalink-container:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: webfactory/ssh-agent@v0.9.0
|
|
with:
|
|
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
|
|
- uses: actions/checkout@v4
|
|
- run: rm -rf /opt/hostedtoolcache
|
|
- uses: docker/login-action@v3
|
|
with:
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
- uses: docker/setup-buildx-action@v3
|
|
- name: Build and push alphalink container
|
|
if: github.event_name == 'push'
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
file: ./docker/alphalink.dockerfile
|
|
push: true
|
|
tags: ${{ secrets.DOCKER_USERNAME }}/alphalink:latest
|
|
ssh: default
|
|
- name: Build and push alphalink container with version
|
|
if: github.event_name == 'release' && github.event.action == 'published'
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
file: ./docker/alphalink.dockerfile
|
|
push: true
|
|
tags: ${{ secrets.DOCKER_USERNAME }}/alphalink:${{ github.event.release.tag_name }}
|
|
ssh: default
|
|
|
|
build-alphafold3-container:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: webfactory/ssh-agent@v0.9.0
|
|
with:
|
|
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
|
|
- uses: actions/checkout@v4
|
|
- run: rm -rf /opt/hostedtoolcache
|
|
- uses: docker/login-action@v3
|
|
with:
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
- uses: docker/setup-buildx-action@v3
|
|
- name: Build and push alphafold3 container
|
|
if: github.event_name == 'push'
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
file: ./docker/alphafold3.dockerfile
|
|
push: true
|
|
tags: ${{ secrets.DOCKER_USERNAME }}/alphafold3:latest
|
|
ssh: default
|
|
- name: Build and push alphafold3 container with version
|
|
if: github.event_name == 'release' && github.event.action == 'published'
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
file: ./docker/alphafold3.dockerfile
|
|
push: true
|
|
tags: ${{ secrets.DOCKER_USERNAME }}/alphafold3:${{ github.event.release.tag_name }}
|
|
ssh: default
|
|
|
|
build-analysis-container:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- run: rm -rf /opt/hostedtoolcache
|
|
- uses: docker/login-action@v3
|
|
with:
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
- uses: docker/setup-buildx-action@v3
|
|
- name: Build and push analysis container
|
|
if: github.event_name == 'push'
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
file: ./docker/analysis.dockerfile
|
|
push: true
|
|
tags: ${{ secrets.DOCKER_USERNAME }}/fold_analysis:latest
|
|
- name: Build and push analysis container with version
|
|
if: github.event_name == 'release' && github.event.action == 'published'
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
file: ./docker/analysis.dockerfile
|
|
push: true
|
|
tags: ${{ secrets.DOCKER_USERNAME }}/fold_analysis:${{ github.event.release.tag_name }}
|