Skip to content

Commit

Permalink
Add Docker build and test workflow***
Browse files Browse the repository at this point in the history
***Update Dockerfile to use bioconductor/bioconductor:3.17***
***Update vignettes with example pipeline
  • Loading branch information
jjjermiah committed Mar 2, 2024
1 parent 6fddae2 commit 7f366be
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 6 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,34 @@ jobs:
with:
upload-snapshots: true

Test-Docker-Build:
# needs: R-CMD-check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Get TAG from DESCRIPTION
run: |
TAG=$(grep 'Version:' DESCRIPTION | grep -oE '[0-9]+(\.[0-9]+)*')
echo "TAG=$TAG" >> $GITHUB_ENV
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Test Docker Build
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
file: ./Dockerfile
push: false

Code-Coverage:
runs-on: ubuntu-latest
env:
Expand Down Expand Up @@ -86,6 +114,8 @@ jobs:
name: coverage-test-failures
path: ${{ runner.temp }}/package



Upload-Docker:
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/newAnnotationGx'
# needs: R-CMD-check
Expand Down
15 changes: 10 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
# Build with: docker build -t bhklab/annotationgx-r:$TAG -f Dockerfile .
# you can set TAG=$(grep 'Version:' DESCRIPTION | grep -oE '[0-9]+(\.[0-9]+)*')
# To push to dockerhub run docker push bhklab/annotationgx-r:$TAG
FROM rocker/r-base
FROM bioconductor/bioconductor:3.17

# copy the current directory contents into the container at /app
COPY . /app

# set a working directory
WORKDIR /app

RUN apt-get -qq update && \
apt-get install -y --no-install-recommends git libxml2-dev
RUN R -e 'devtools::install_github("bhklab/AnnotationGx", upgrade = T)'

RUN Rscript -e "install.packages('pak', repos = 'https://r-lib.github.io/p/pak/dev/')"
RUN Rscript -e "pak::pkg_install(c('jsonlite','bhklab/AnnotationGx@main'), ask = F)"
# RUN install2.r --error --deps TRUE \
# qpdf \
# devtools \
# jsonlite \
# && rm -rf /tmp/downloaded_packages/ /tmp/*.rds

# RUN apt-get clean && apt-get -y update && apt-get install -y --no-install-recommends curl

# RUN installGithub.r \
# bhklab/AnnotationGx
2 changes: 1 addition & 1 deletion vignettes/Cellosaurus.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ mapCell2Accession("BT474", numResults=1, prioritizeParent=TRUE)



### Example pipeline to annotate a dataset
### Example pipeline to annotate a dataseGSM1897356t
#TODO::incomplete

We will be working with some data from the GDSC and Cell Model Passports datasets
Expand Down

0 comments on commit 7f366be

Please sign in to comment.