-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: BLAST Dockerfile and GitHub CI pipeline
- Loading branch information
Showing
3 changed files
with
75 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: Build BLAST container push to quay.io | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- 'v*' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Source | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to Quay.io | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: quay.io | ||
username: rosalindfranklininstitute+github_blast | ||
password: ${{ secrets.QUAYIO_TOKEN }} | ||
|
||
- name: Set BLAST version | ||
run: | | ||
echo BLAST_VERSION=$([ "$GITHUB_REF_TYPE" = "tag" ] && echo $GITHUB_REF_NAME || curl https://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/VERSION 2>/dev/null) >> $GITHUB_ENV | ||
- name: Docker metadata | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: | | ||
quay.io/rosalindfranklininstitute/blast | ||
tags: | | ||
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }} | ||
type=semver,pattern={{version}} | ||
type=semver,pattern={{major}}.{{minor}} | ||
labels: | | ||
blast-version=${{ env.BLAST_VERSION }} | ||
- name: Build and push image | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: . | ||
platforms: linux/amd64,linux/arm64 | ||
build-args: | | ||
BLAST_VERSION=${{ env.BLAST_VERSION }} | ||
push: ${{ github.event_name != 'pull_request' }} | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
FROM python:3.12-slim-bookworm AS blast | ||
|
||
ARG BLAST_VERSION | ||
|
||
RUN apt update && apt install -y wget g++ make liblmdb-dev libsqlite3-dev | ||
RUN mkdir /blast | ||
RUN wget -qO- https://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/${BLAST_VERSION}/ncbi-blast-${BLAST_VERSION}+-src.tar.gz \ | ||
| tar xz --strip-components 2 -C /blast | ||
WORKDIR /blast | ||
RUN ./configure --with-projects=scripts/projects/blast/project.lst | ||
RUN cd ReleaseMT/build && make all_p | ||
|
||
ENV PATH="$PATH:/blast/ReleaseMT/bin" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# NCBI Blast+ tools | ||
|
||
Containerised build of [BLAST+](https://blast.ncbi.nlm.nih.gov/doc/blast-help/downloadblastdata.html). | ||
|
||
Work in progress! |