Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 75 additions & 0 deletions .github/workflows/ci-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Run Tests with Docker image

on:
pull_request:
branches: [main]
workflow_dispatch:

jobs:
start-aws-runner:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
outputs:
mapping: ${{ steps.aws-start.outputs.mapping }}
instances: ${{ steps.aws-start.outputs.instances }}
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::203627415330:role/of-gha-runner
aws-region: us-east-1
- name: Create cloud runner
id: aws-start
uses: omsf/start-aws-gha-runner@v1.0.0
with:
aws_image_id: ami-0754c6e75b3b97dcd # Deep Learning AMI Neuron (Ubuntu 22.04)
aws_instance_type: t3.2xlarge
aws_home_dir: /home/ubuntu
env:
GH_PAT: ${{ secrets.GH_PAT }}

test-openfold-docker:
runs-on: ${{ fromJSON(needs.start-aws-runner.outputs.instances) }}
needs:
- start-aws-runner
steps:
- uses: actions/checkout@v5

- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Pull pre-built Docker image
run: docker pull openfoldconsortium/openfold3:stable

- name: Build test layers on Docker image
run: docker build -t openfold3-test-runner -f openfold3/tests/Dockerfile .

- name: Run unit tests
run: docker run -v ${{ github.workspace }}:/opt/openfold3 openfold3-test-runner:latest pytest openfold3/tests

stop-aws-runner:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
needs:
- start-aws-runner
- test-openfold-docker
if: ${{ always() }}
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::203627415330:role/of-gha-runner
aws-region: us-east-1
- name: Stop instances
uses: omsf/stop-aws-gha-runner@v1.0.0
with:
instance_mapping: ${{ needs.start-aws-runner.outputs.mapping }}
env:
GH_PAT: ${{ secrets.GH_PAT }}
43 changes: 0 additions & 43 deletions .github/workflows/docker-image.yml

This file was deleted.

110 changes: 110 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
name: Publish Docker image

on:
workflow_dispatch: # Allow manual creation of docker images
inputs:
version:
description: 'Version tag (e.g., 1.0.0)'
required: true
type: string
additional_tags:
description: 'Additional tags (comma-separated, e.g., latest,stable)'
required: false
type: string
default: ''
release:
types: [published]

jobs:
start-aws-runner:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
outputs:
mapping: ${{ steps.aws-start.outputs.mapping }}
instances: ${{ steps.aws-start.outputs.instances }}
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::203627415330:role/of-gha-runner
aws-region: us-east-1
- name: Create cloud runner
id: aws-start
uses: omsf/start-aws-gha-runner@v1.1.0
with:
aws_image_id: ami-0754c6e75b3b97dcd # Deep Learning AMI Neuron (Ubuntu 22.04)
aws_instance_type: trn1.2xlarge
aws_home_dir: /home/ubuntu
env:
GH_PAT: ${{ secrets.GH_PAT }}

push-to-registry:
name: Push Docker image to Docker Hub
runs-on: ${{ fromJSON(needs.start-aws-runner.outputs.instances) }}
needs:
- start-aws-runner
permissions:
packages: write
contents: read
attestations: write
id-token: write
steps:
- name: Check out the repo
uses: actions/checkout@v5

- name: Log in to Docker Hub
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: openfoldconsortium/openfold3
tags: |
type=raw,value=${{ inputs.version }},enable=${{ github.event_name == 'workflow_dispatch' }}
type=raw,value=${{ inputs.additional_tags }},enable=${{ inputs.additional_tags != '' && github.event_name == 'workflow_dispatch' }}
type=semver,pattern={{major}}.{{minor}}

- name: Build and push Docker image
id: push
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

- name: Generate artifact attestation
uses: actions/attest-build-provenance@v3
with:
subject-name: index.docker.io/openfoldconsortium/openfold3
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true

stop-aws-runner:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
needs:
- start-aws-runner
- push-to-registry
if: ${{ always() }}
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::203627415330:role/of-gha-runner
aws-region: us-east-1
- name: Stop instances
uses: omsf/stop-aws-gha-runner@v1.0.0
with:
instance_mapping: ${{ needs.start-aws-runner.outputs.mapping }}
env:
GH_PAT: ${{ secrets.GH_PAT }}
25 changes: 0 additions & 25 deletions .github/workflows/run-test.yml

This file was deleted.

14 changes: 3 additions & 11 deletions docs/source/Installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,22 +38,14 @@ mamba install kalign2 -c bioconda

### OpenFold3 Docker Image

A compressed version of the OpenFold3 image is available on HuggingFace at this [link](https://huggingface.co/OpenFold/OpenFold3/tree/main/docker_image) The size of the compressed image is ~14GB.
The OpenFold3 Docker Image is now available on Docker Hub: [openfoldconsortium/openfold3](https://hub.docker.com/repository/docker/openfoldconsortium/openfold3/general)

To verify the compressed file is not unintentionally corrupted, you can check against the md5 checksum file provided with the following command and expected output.
To get the latest stable version, you can use the following command

```bash
$ md5sum -c openfold3_image.tar.bz2.md5
openfold3_image.tar.bz2: OK
docker pull openfoldconsortium/openfold3:stable
```

The image may then be unpacked with the following command:

```bash
docker load --input openfold3_image.tar.bz2
```


### Building the OpenFold3 Docker Image

If you would like to build an OpenFold docker image locally, we provide a dockerfile. You may build this image with the following command:
Expand Down
6 changes: 4 additions & 2 deletions openfold3/tests/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
FROM openfold-base
# Copy Openfold3 folder and build dependencies needed for testing
FROM openfoldconsortium/openfold3:stable

COPY openfold3/tests /opt/openfold3/tests
COPY openfold3 /opt/openfold3
COPY environments/development.txt /opt/openfold3/development.txt

WORKDIR /opt/openfold3
RUN pip install -r development.txt
RUN pip install --force-reinstall --no-deps .
Loading