From 9c1f794b3b8a15ebbb6ecd5387ae714660497589 Mon Sep 17 00:00:00 2001 From: Sergey Lyskov Date: Fri, 20 Jun 2025 19:11:53 -0400 Subject: [PATCH 01/11] add GitHub workflow --- .github/workflows/main.yml | 78 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..cd9cacec --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,78 @@ +# This workflow will install Python dependencies, run tests and lint with a single version of Python +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python + +name: Python application + +on: + push: + branches: [ "main", "github-ci" ] + pull_request: + branches: [ "main", "github-ci" ] + +permissions: + contents: read + +jobs: + build: + + #runs-on: ubuntu-latest + runs-on: ubuntu-24.04 + + steps: + - uses: actions/checkout@v4 + - name: Set up Python 3.10 + uses: actions/setup-python@v3 + with: + python-version: "3.10" + # - name: Install dependencies + # run: | + # python -m pip install --upgrade pip + # #pip install flake8 pytest + # pip install pytest + # if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + # - name: Lint with flake8 + # run: | + # # stop the build if there are Python syntax errors or undefined names + # flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + # # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide + # flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + + - name: Install dependencies + run: | + curl -LsSf https://astral.sh/uv/install.sh | sh + + uv python install 3.9 + uv venv + uv pip install --no-cache-dir -q \ + dgl==1.0.2+cu116 -f https://data.dgl.ai/wheels/cu116/repo.html \ + torch==1.12.1+cu116 --extra-index-url https://download.pytorch.org/whl/cu116 \ + e3nn==0.3.3 \ + wandb==0.12.0 \ + pynvml==11.0.0 \ + git+https://github.com/NVIDIA/dllogger#egg=dllogger \ + decorator==5.1.0 \ + hydra-core==1.3.2 \ + pyrsistent==0.19.3 + + uv pip install --no-cache-dir env/SE3Transformer + uv pip install --no-cache-dir -e . --no-deps + rm -rf ~/.cache # /app/RFdiffusion/tests + + - name: Download weights + run: | + mkdir models + wget -q -O models/Base_ckpt.pt http://files.ipd.uw.edu/pub/RFdiffusion/6f5902ac237024bdd0c176cb93063dc4/Base_ckpt.pt + wget -q -O models/Complex_base_ckpt.pt http://files.ipd.uw.edu/pub/RFdiffusion/e29311f6f1bf1af907f9ef9f44b8328b/Complex_base_ckpt.pt + wget -q -O models/Complex_Fold_base_ckpt.pt http://files.ipd.uw.edu/pub/RFdiffusion/60f09a193fb5e5ccdc4980417708dbab/Complex_Fold_base_ckpt.pt + wget -q -O models/InpaintSeq_ckpt.pt http://files.ipd.uw.edu/pub/RFdiffusion/74f51cfb8b440f50d70878e05361d8f0/InpaintSeq_ckpt.pt + wget -q -O models/InpaintSeq_Fold_ckpt.pt http://files.ipd.uw.edu/pub/RFdiffusion/76d00716416567174cdb7ca96e208296/InpaintSeq_Fold_ckpt.pt + wget -q -O models/ActiveSite_ckpt.pt http://files.ipd.uw.edu/pub/RFdiffusion/5532d2e1f3a4738decd58b19d633b3c3/ActiveSite_ckpt.pt + wget -q -O models/Base_epoch8_ckpt.pt http://files.ipd.uw.edu/pub/RFdiffusion/12fc204edeae5b57713c5ad7dcb97d39/Base_epoch8_ckpt.pt + #optional + wget -q -O models/Complex_beta_ckpt.pt http://files.ipd.uw.edu/pub/RFdiffusion/f572d396fae9206628714fb2ce00f72e/Complex_beta_ckpt.pt + #original structure prediction weights + wget -q -O models/RF_structure_prediction_weights.pt http://files.ipd.uw.edu/pub/RFdiffusion/1befcb9b28e2f778f53d47f18b7597fa/RF_structure_prediction_weights.pt + + - name: Test with pytest + run: | + pytest From 84d4304eca0113e3563680d8549a640199844d30 Mon Sep 17 00:00:00 2001 From: Sergey Lyskov Date: Fri, 20 Jun 2025 19:20:32 -0400 Subject: [PATCH 02/11] update main.yml --- .github/workflows/main.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index cd9cacec..394d9752 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -52,7 +52,8 @@ jobs: git+https://github.com/NVIDIA/dllogger#egg=dllogger \ decorator==5.1.0 \ hydra-core==1.3.2 \ - pyrsistent==0.19.3 + pyrsistent==0.19.3 \ + pytest uv pip install --no-cache-dir env/SE3Transformer uv pip install --no-cache-dir -e . --no-deps @@ -73,6 +74,12 @@ jobs: #original structure prediction weights wget -q -O models/RF_structure_prediction_weights.pt http://files.ipd.uw.edu/pub/RFdiffusion/1befcb9b28e2f778f53d47f18b7597fa/RF_structure_prediction_weights.pt - - name: Test with pytest + - name: Setup and Run ppi_scaffolds tests run: | - pytest + tar -xvf examples/ppi_scaffolds_subset.tar.gz -C examples + cd tests && uv run python test_diffusion.py + + + # - name: Test with pytest + # run: | + # pytest From 275cd00c81a2e8798dfb1aad54a44d387847f832 Mon Sep 17 00:00:00 2001 From: Sergey Lyskov Date: Fri, 20 Jun 2025 19:24:20 -0400 Subject: [PATCH 03/11] use Python-3.9 --- .github/workflows/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 394d9752..96803137 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,17 +13,17 @@ permissions: contents: read jobs: - build: + ppi-scaffolds-test: #runs-on: ubuntu-latest runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 - - name: Set up Python 3.10 + - name: Set up Python 3.9 uses: actions/setup-python@v3 with: - python-version: "3.10" + python-version: "3.9" # - name: Install dependencies # run: | # python -m pip install --upgrade pip From 48676ff0ec450c351ae67608d91b0b4365a7bbbf Mon Sep 17 00:00:00 2001 From: Sergey Lyskov Date: Fri, 20 Jun 2025 19:34:17 -0400 Subject: [PATCH 04/11] use nvidia/cuda container --- .github/workflows/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 96803137..eef35e0a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,7 +16,8 @@ jobs: ppi-scaffolds-test: #runs-on: ubuntu-latest - runs-on: ubuntu-24.04 + runs-on: ubuntu-20.04 + container: nvcr.io/nvidia/cuda:11.6.2-cudnn8-runtime-ubuntu20.04 steps: - uses: actions/checkout@v4 From f20d63128f4c473875f4718018d81db4f4ad9acd Mon Sep 17 00:00:00 2001 From: Sergey Lyskov Date: Fri, 20 Jun 2025 19:36:49 -0400 Subject: [PATCH 05/11] use ubuntu-24.04 --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index eef35e0a..6240e482 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,8 +16,8 @@ jobs: ppi-scaffolds-test: #runs-on: ubuntu-latest - runs-on: ubuntu-20.04 - container: nvcr.io/nvidia/cuda:11.6.2-cudnn8-runtime-ubuntu20.04 + runs-on: ubuntu-24.04 + container: nvcr.io/nvidia/cuda:11.6.2-cudnn8-runtime-ubuntu24.04 steps: - uses: actions/checkout@v4 From 8ddd0a6719e65fa86167579b863f48823a1035e6 Mon Sep 17 00:00:00 2001 From: Sergey Lyskov Date: Fri, 20 Jun 2025 19:40:20 -0400 Subject: [PATCH 06/11] use nvcr.io/nvidia/cuda:12.9.1-cudnn-runtime-ubuntu20.04 --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6240e482..f4ae0a4c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -17,7 +17,7 @@ jobs: #runs-on: ubuntu-latest runs-on: ubuntu-24.04 - container: nvcr.io/nvidia/cuda:11.6.2-cudnn8-runtime-ubuntu24.04 + container: nvcr.io/nvidia/cuda:12.9.1-cudnn-runtime-ubuntu20.04 steps: - uses: actions/checkout@v4 From 3533ebc129cd7b459d59b2a89b42c4f670f42238 Mon Sep 17 00:00:00 2001 From: Sergey Lyskov Date: Fri, 20 Jun 2025 19:45:50 -0400 Subject: [PATCH 07/11] install dependencies --- .github/workflows/main.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f4ae0a4c..e6f6d3e2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -17,7 +17,8 @@ jobs: #runs-on: ubuntu-latest runs-on: ubuntu-24.04 - container: nvcr.io/nvidia/cuda:12.9.1-cudnn-runtime-ubuntu20.04 + #container: nvcr.io/nvidia/cuda:12.9.1-cudnn-runtime-ubuntu20.04 + container: nvcr.io/nvidia/cuda:11.6.2-cudnn8-runtime-ubuntu20.04 steps: - uses: actions/checkout@v4 @@ -40,6 +41,13 @@ jobs: - name: Install dependencies run: | + sudo apt-get update -qq && apt-get install -y --no-install-recommends \ + build-essential \ + git \ + curl \ + wget \ + ca-certificates + curl -LsSf https://astral.sh/uv/install.sh | sh uv python install 3.9 From 3c7cd74cf2ff428fe1cea06cd235b80be035ec25 Mon Sep 17 00:00:00 2001 From: Sergey Lyskov Date: Fri, 20 Jun 2025 19:48:08 -0400 Subject: [PATCH 08/11] remove sudo --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e6f6d3e2..58a31318 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -41,7 +41,7 @@ jobs: - name: Install dependencies run: | - sudo apt-get update -qq && apt-get install -y --no-install-recommends \ + apt-get update -qq && apt-get install -y --no-install-recommends \ build-essential \ git \ curl \ From 258a40ce47c3ebb41e04e0cc8508a340e8a38c71 Mon Sep 17 00:00:00 2001 From: Sergey Lyskov Date: Fri, 20 Jun 2025 19:50:46 -0400 Subject: [PATCH 09/11] set UV paths --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 58a31318..86a64131 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -49,6 +49,7 @@ jobs: ca-certificates curl -LsSf https://astral.sh/uv/install.sh | sh + source $HOME/.local/bin/env (sh, bash, zsh) uv python install 3.9 uv venv From b4ac9288871c59b94243ccbc57f2b563fc8253bc Mon Sep 17 00:00:00 2001 From: Sergey Lyskov Date: Fri, 20 Jun 2025 19:53:48 -0400 Subject: [PATCH 10/11] set UV paths --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 86a64131..69ffb462 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -49,7 +49,7 @@ jobs: ca-certificates curl -LsSf https://astral.sh/uv/install.sh | sh - source $HOME/.local/bin/env (sh, bash, zsh) + source $HOME/.local/bin/env bash uv python install 3.9 uv venv From bfb657607eb874ad00971758fbe97ae59728f40a Mon Sep 17 00:00:00 2001 From: Sergey Lyskov Date: Fri, 20 Jun 2025 19:55:56 -0400 Subject: [PATCH 11/11] set UV paths --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 69ffb462..6b23c5dc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -49,7 +49,7 @@ jobs: ca-certificates curl -LsSf https://astral.sh/uv/install.sh | sh - source $HOME/.local/bin/env bash + . $HOME/.local/bin/env bash uv python install 3.9 uv venv