|
| 1 | +# This workflow will install Python dependencies, run tests and lint with a single version of Python |
| 2 | +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python |
| 3 | + |
| 4 | +name: Python application |
| 5 | + |
| 6 | +on: |
| 7 | + push: |
| 8 | + branches: [ "main", "github-ci" ] |
| 9 | + pull_request: |
| 10 | + branches: [ "main", "github-ci" ] |
| 11 | + |
| 12 | +permissions: |
| 13 | + contents: read |
| 14 | + |
| 15 | +jobs: |
| 16 | + ppi-scaffolds-test: |
| 17 | + |
| 18 | + #runs-on: ubuntu-latest |
| 19 | + runs-on: ubuntu-24.04 |
| 20 | + #container: nvcr.io/nvidia/cuda:12.9.1-cudnn-runtime-ubuntu20.04 |
| 21 | + container: nvcr.io/nvidia/cuda:11.6.2-cudnn8-runtime-ubuntu20.04 |
| 22 | + |
| 23 | + steps: |
| 24 | + - uses: actions/checkout@v4 |
| 25 | + - name: Set up Python 3.9 |
| 26 | + uses: actions/setup-python@v3 |
| 27 | + with: |
| 28 | + python-version: "3.9" |
| 29 | + # - name: Install dependencies |
| 30 | + # run: | |
| 31 | + # python -m pip install --upgrade pip |
| 32 | + # #pip install flake8 pytest |
| 33 | + # pip install pytest |
| 34 | + # if [ -f requirements.txt ]; then pip install -r requirements.txt; fi |
| 35 | + # - name: Lint with flake8 |
| 36 | + # run: | |
| 37 | + # # stop the build if there are Python syntax errors or undefined names |
| 38 | + # flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics |
| 39 | + # # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide |
| 40 | + # flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics |
| 41 | + |
| 42 | + - name: Install dependencies |
| 43 | + run: | |
| 44 | + apt-get update -qq && apt-get install -y --no-install-recommends \ |
| 45 | + build-essential \ |
| 46 | + git \ |
| 47 | + curl \ |
| 48 | + wget \ |
| 49 | + ca-certificates |
| 50 | +
|
| 51 | + curl -LsSf https://astral.sh/uv/install.sh | sh |
| 52 | + . $HOME/.local/bin/env bash |
| 53 | +
|
| 54 | + uv python install 3.9 |
| 55 | + uv venv |
| 56 | + uv pip install --no-cache-dir -q \ |
| 57 | + dgl==1.0.2+cu116 -f https://data.dgl.ai/wheels/cu116/repo.html \ |
| 58 | + torch==1.12.1+cu116 --extra-index-url https://download.pytorch.org/whl/cu116 \ |
| 59 | + e3nn==0.3.3 \ |
| 60 | + wandb==0.12.0 \ |
| 61 | + pynvml==11.0.0 \ |
| 62 | + git+https://github.com/NVIDIA/dllogger#egg=dllogger \ |
| 63 | + decorator==5.1.0 \ |
| 64 | + hydra-core==1.3.2 \ |
| 65 | + pyrsistent==0.19.3 \ |
| 66 | + pytest |
| 67 | +
|
| 68 | + uv pip install --no-cache-dir env/SE3Transformer |
| 69 | + uv pip install --no-cache-dir -e . --no-deps |
| 70 | + rm -rf ~/.cache # /app/RFdiffusion/tests |
| 71 | +
|
| 72 | + - name: Download weights |
| 73 | + run: | |
| 74 | + mkdir models |
| 75 | + wget -q -O models/Base_ckpt.pt http://files.ipd.uw.edu/pub/RFdiffusion/6f5902ac237024bdd0c176cb93063dc4/Base_ckpt.pt |
| 76 | + wget -q -O models/Complex_base_ckpt.pt http://files.ipd.uw.edu/pub/RFdiffusion/e29311f6f1bf1af907f9ef9f44b8328b/Complex_base_ckpt.pt |
| 77 | + wget -q -O models/Complex_Fold_base_ckpt.pt http://files.ipd.uw.edu/pub/RFdiffusion/60f09a193fb5e5ccdc4980417708dbab/Complex_Fold_base_ckpt.pt |
| 78 | + wget -q -O models/InpaintSeq_ckpt.pt http://files.ipd.uw.edu/pub/RFdiffusion/74f51cfb8b440f50d70878e05361d8f0/InpaintSeq_ckpt.pt |
| 79 | + wget -q -O models/InpaintSeq_Fold_ckpt.pt http://files.ipd.uw.edu/pub/RFdiffusion/76d00716416567174cdb7ca96e208296/InpaintSeq_Fold_ckpt.pt |
| 80 | + wget -q -O models/ActiveSite_ckpt.pt http://files.ipd.uw.edu/pub/RFdiffusion/5532d2e1f3a4738decd58b19d633b3c3/ActiveSite_ckpt.pt |
| 81 | + wget -q -O models/Base_epoch8_ckpt.pt http://files.ipd.uw.edu/pub/RFdiffusion/12fc204edeae5b57713c5ad7dcb97d39/Base_epoch8_ckpt.pt |
| 82 | + #optional |
| 83 | + wget -q -O models/Complex_beta_ckpt.pt http://files.ipd.uw.edu/pub/RFdiffusion/f572d396fae9206628714fb2ce00f72e/Complex_beta_ckpt.pt |
| 84 | + #original structure prediction weights |
| 85 | + wget -q -O models/RF_structure_prediction_weights.pt http://files.ipd.uw.edu/pub/RFdiffusion/1befcb9b28e2f778f53d47f18b7597fa/RF_structure_prediction_weights.pt |
| 86 | +
|
| 87 | + - name: Setup and Run ppi_scaffolds tests |
| 88 | + run: | |
| 89 | + tar -xvf examples/ppi_scaffolds_subset.tar.gz -C examples |
| 90 | + cd tests && uv run python test_diffusion.py |
| 91 | +
|
| 92 | +
|
| 93 | + # - name: Test with pytest |
| 94 | + # run: | |
| 95 | + # pytest |
0 commit comments