Skip to content
This repository has been archived by the owner on Mar 3, 2024. It is now read-only.

Commit

Permalink
Update CI workflows and add benchmark (#32)
Browse files Browse the repository at this point in the history
* Refactor Docker image building workflow

* remove outdated actions

* add benchmark workflow

* download test dataset

* fix requirements

* upload test result in benchmark

* build:fix bm test vs result

* fix missing path for python scripts

---------

Co-authored-by: Yuan Yannan <[email protected]>
  • Loading branch information
caic99 and YNYuan authored Feb 26, 2024
1 parent cb15a1d commit 5d41ce6
Show file tree
Hide file tree
Showing 5 changed files with 95 additions and 170 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Uni-Dock Benchmark
on:
workflow_dispatch:
inputs:
tag:
description: "Docker image used"
required: false
default: "latest"
jobs:
unidock_benchmark:
runs-on: nvidia
container:
image: dptechnology/unidock:${{ github.event.inputs.tag }}
options: --gpus all
steps:
- name: Checkout test suites
uses: actions/checkout@v4
with:
repository: dptech-corp/Uni-Dock-Benchmarks
- name: Setup Python
uses: actions/setup-python@v5
- name: Install requirements
run: |
apt update && apt install -y wget unzip
pip install -r scripts/requirements.txt
- name: Run molecular docking benchmarks
run: |
python3 scripts/test_molecular_docking.py
- name: Upload docking results
uses: actions/upload-artifact@v4
with:
name: molecular_docking_results.csv
path: results/results.csv
- name: Upload docking metrics
uses: actions/upload-artifact@v4
with:
name: molecular_docking_metrics.csv
path: results/metrics.csv

- name: Run virtual screening benchmarks
run: |
rm -rf results
python3 scripts/test_virtual_screening.py
- name: Upload virtual screening results
uses: actions/upload-artifact@v4
with:
name: virtual_screening_results.csv
path: results/results.csv
68 changes: 0 additions & 68 deletions .github/workflows/ci_docker.yml

This file was deleted.

46 changes: 46 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Uni-Dock/Tools Build Image Workflow
on:
workflow_dispatch:
push:
branches:
- main
tags:
- "*"

jobs:
build_and_push_docker_image:
runs-on: ubuntu-latest
if: github.repository_owner == 'dptech-corp'
strategy:
matrix:
target: [unidock, unidock_tools]
max-parallel: 1 # Ensures unidock_tools is built after unidock

steps:
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: dptechnology/${{ matrix.target }}
tags: |
type=sha
type=semver,pattern={{version}}
type=raw,value=latest
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: dptechnology
password: ${{ secrets.DOCKERHUB_PAT }}

- name: build and push container
uses: docker/build-push-action@v5
with:
platforms: linux/amd64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
file: Dockerfile
context: "{{defaultContext}}:${{ matrix.target }}"
push: true
53 changes: 0 additions & 53 deletions .github/workflows/docker_auto_build.yml

This file was deleted.

49 changes: 0 additions & 49 deletions .github/workflows/internal_testing.yml

This file was deleted.

0 comments on commit 5d41ce6

Please sign in to comment.