-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from artur-sannikov/docker
Add Docker image
- Loading branch information
Showing
5 changed files
with
186 additions
and
23 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,96 @@ | ||
name: docker | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build-push: | ||
runs-on: ubuntu-latest | ||
name: build-book (${{ github.ref_name }}) | ||
permissions: | ||
contents: write | ||
packages: write | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Collect Workflow Telemetry | ||
uses: runforesight/workflow-telemetry-action@v1 | ||
|
||
- name: Clean up Docker environment | ||
run: | | ||
docker system prune --all --force --volumes | ||
- name: Additional disk space cleanup | ||
run: | | ||
sudo rm -rf /usr/share/dotnet | ||
sudo rm -rf /opt/ghc | ||
sudo rm -rf /usr/local/lib/android/sdk | ||
sudo apt-get clean | ||
sudo rm -rf /var/lib/apt/lists/* | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Cache Docker layers | ||
uses: actions/cache@v4 | ||
with: | ||
path: /tmp/.buildx-cache | ||
key: ${{ runner.os }}-buildx-${{ github.sha }} | ||
restore-keys: | | ||
${{ runner.os }}-buildx- | ||
- name: Get package metadata | ||
id: info | ||
env: | ||
OWNER: ${{ github.repository_owner }} | ||
run: | | ||
Pkgname=$(grep -m1 -E '^Package: +' DESCRIPTION | sed -E 's/.*: +//') | ||
echo Pkgname=${Pkgname} >> "${GITHUB_ENV}" | ||
pkgname=${Pkgname,,} | ||
echo pkgname=${pkgname} >> "${GITHUB_ENV}" | ||
owner=${OWNER,,} | ||
echo owner=${owner} >> "${GITHUB_ENV}" | ||
echo pkgversion=$(grep -m1 -E '^Version: +' DESCRIPTION | sed -E 's/.*: +//') >> "${GITHUB_ENV}" | ||
- name: Log in to the Github Container registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ env.owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Get metadata for Docker | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: ghcr.io/${{ env.owner }}/${{ env.pkgname }} | ||
tags: | | ||
${{ github.ref_name }} | ||
${{ env.pkgversion }} | ||
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'devel') }} | ||
- name: Install, build and check package in local Docker image | ||
id: docker | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: . | ||
load: true | ||
cache-from: type=local,src=/tmp/.buildx-cache | ||
cache-to: type=local,dest=/tmp/.buildx-cache | ||
tags: ${{ steps.meta.outputs.tags }} | ||
|
||
- name: Push local Docker image to ghcr.io | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: . | ||
push: true | ||
cache-from: type=local,src=/tmp/.buildx-cache | ||
cache-to: type=local,dest=/tmp/.buildx-cache | ||
tags: ${{ steps.meta.outputs.tags }} |
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
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 |
---|---|---|
|
@@ -5,7 +5,17 @@ Date: 2023-08-02 | |
Authors: Himel Mallick (Cornell University) <[email protected]>, Anupreet Porwal (Google) <[email protected]> | ||
Description: IntegratedLearner provides an integrated machine learning framework to 1) consolidate predictions by borrowing information across several longitudinal and cross-sectional omics data layers, 2) decipher the mechanistic role of individual omics features that can potentially lead to new sets of testable hypotheses, and 3) quantify uncertainty of the integration process. Three types of integration paradigms are supported: early, late, and intermediate. The software includes multiple ML models based on the SuperLearner R package as well as several data exploration capabilities and visualization modules in a unified estimation framework. | ||
Depends: R (>= 3.6) | ||
Imports: SuperLearner, tidyverse, caret, mcmcplots, glmnetUtils, ROCR, quadprog, nloptr | ||
Imports: | ||
bartMachine, | ||
caret, | ||
cowplot, | ||
glmnetUtils, | ||
mcmcplots, | ||
nloptr, | ||
quadprog, | ||
ROCR, | ||
SuperLearner, | ||
tidyverse | ||
Suggests: data.table, knitr | ||
License: MIT + file LICENSE | ||
LazyData: TRUE | ||
|
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,24 @@ | ||
|
||
|
||
wget -qO - https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/master/pub.gpg \ | ||
| gpg --dearmor \ | ||
| sudo dd of=/usr/share/keyrings/vscodium-archive-keyring.gpg | ||
# Fetch base image for R version 4.4.1 | ||
FROM rocker/rstudio:4.4.1 | ||
|
||
# Copy repository into the container image | ||
COPY --chown=rstudio:rstudio . /opt/pkg | ||
|
||
# Install Java | ||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends \ | ||
openjdk-21-jdk | ||
|
||
# Let R automatically find Java files | ||
RUN R CMD javareconf | ||
|
||
# Install devtools | ||
RUN Rscript -e 'install.packages("devtools")' | ||
|
||
# Install IntegratedLearner | ||
RUN R -e 'devtools::install(pkg = "/opt/pkg", dependencies = TRUE, upgrade = "always")' |
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