Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding support for CGC w/ Automation #8

Merged
merged 17 commits into from
Sep 14, 2021
Merged
Show file tree
Hide file tree
Changes from 10 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
6 changes: 6 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.git/
demo_scripts/
docs/
inst/
man/

18 changes: 18 additions & 0 deletions .github/workflows/cgc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: "Deploy to CGC"
on:
release:
types: [released, edited]
jobs:
cgc:
runs-on: ubuntu-20.04
name: "Deploy"
steps:
- uses: actions/checkout@v2
- id: cgcdeploy
uses: jordan-rash/[email protected]
with:
file_location: "cgc/netbid.cwl"
shortid: "stjude/netbid/netbid"
env:
CGC_TOKEN: ${{ secrets.CGC_TOKEN }}

59 changes: 59 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Package
on:
release:
types: [released, edited]

jobs:
push_to_registry:
name: Push Docker image to GitHub Packages
runs-on: ubuntu-latest
steps:
-
name: Check out the repo
uses: actions/checkout@v2
-
name: Determine Short SHA
run: echo ${{ github.sha }} | tail -c 8 | (read; echo SHORT_SHA=$REPLY) >> $GITHUB_ENV
-
name: Sanitize Repo Name for Tagging
run: echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]' | (read; echo REPO_LOWER=$REPLY) >> $GITHUB_ENV
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ secrets.CLOUDY_USERNAME }}
password: ${{ secrets.CLOUDY_TOKEN }}
adthrasher marked this conversation as resolved.
Show resolved Hide resolved
jordan-rash marked this conversation as resolved.
Show resolved Hide resolved
jordan-rash marked this conversation as resolved.
Show resolved Hide resolved
-
name: Login to Cancer Genomics Cloud Container Registry
uses: docker/login-action@v1
with:
registry: cgc-images.sbgenomics.com
username: ${{ secrets.CGC_USERNAME }}
password: ${{ secrets.CGC_TOKEN }}
adthrasher marked this conversation as resolved.
Show resolved Hide resolved
-
name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile.cgc
push: true
tags: |
ghcr.io/${{ env.REPO_LOWER }}:latest
ghcr.io/${{ env.REPO_LOWER }}:${{ env.SHORT_SHA }}
ghcr.io/${{ env.REPO_LOWER }}:${{ github.event.release.tag_name }}
jordan-rash marked this conversation as resolved.
Show resolved Hide resolved
cgc-images.sbgenomics.com/${{ env.REPO_LOWER }}:latest
cgc-images.sbgenomics.com/${{ env.REPO_LOWER }}:${{ env.SHORT_SHA }}
cgc-images.sbgenomics.com/${{ env.REPO_LOWER }}:${{ github.event.release.tag_name }}
adthrasher marked this conversation as resolved.
Show resolved Hide resolved
jordan-rash marked this conversation as resolved.
Show resolved Hide resolved
labels: |
org.opencontainers.image.source=https://github.com/${{ github.repository }}
-
name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
.Rhistory
.RData
.Ruserdata
.DS_Store
32 changes: 32 additions & 0 deletions Dockerfile.cgc
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
FROM r-base

RUN apt-get update && apt-get install -y \
build-essential \
libcurl4-gnutls-dev \
libxml2-dev \
libssl-dev \
libgit2-dev \
libcairo2-dev \
libxt-dev \
xvfb \
pandoc \
xauth \
xfonts-base \
libssl1.1 \
&& rm -rf /var/lib/apt/lists/*

# install R packages available in CRAN
RUN R -e 'install.packages(c("optparse", "dplyr", "devtools", "BiocManager", "plot3D"))'

# install R packages via Bioconductor
RUN R -e 'BiocManager::install(c("biomaRt", "GSVA", "rhdf5", "ComplexHeatmap", "ConsensusClusterPlus", "DESeq2", "tximport", "impute", "limma", "GEOquery"))'

# install NetBID2 from GitHub master branch
RUN xvfb-run R -e 'devtools::install_github("jyyulab/NetBID", ref="master", dependencies="Depends")'

WORKDIR /data
COPY IBC_CCDI .

ENTRYPOINT ["Rscript"]
CMD ["IBC_CCDI.R"]
jordan-rash marked this conversation as resolved.
Show resolved Hide resolved
#CMD ["-q", "-e", "packageVersion(\"NetBID2\")"]
Binary file not shown.
Loading