Skip to content

Commit 20693a2

Browse files
dsweber2dshemetov
authored andcommitted
fix: errors in build-container-images.yml
* pin to rocker/tidyverse:4.2 * update Dockerfile to use pak and rspm for package installation * add workflow_dispatch button
1 parent 16a2128 commit 20693a2

File tree

2 files changed

+9
-13
lines changed

2 files changed

+9
-13
lines changed

.github/workflows/build-container-images.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@ name: Build indicator container images and upload to registry
22

33
on:
44
push:
5-
branches: [ main, prod ]
5+
branches: [main, prod]
6+
workflow_dispatch:
67

78
jobs:
89
build:
910
runs-on: ubuntu-latest
1011
strategy:
1112
matrix:
12-
packages: [ backfill_corrections ]
13+
packages: [backfill_corrections]
1314
steps:
1415
- name: Checkout code
1516
uses: actions/checkout@v2

backfill_corrections/Dockerfile

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
FROM gurobi/optimizer:9.5.1 as gurobi
22

33
## Install R and tidyverse
4-
FROM rocker/tidyverse:latest
4+
FROM rocker/tidyverse:4.2
55

66
WORKDIR /opt/gurobi
77
COPY --from=gurobi /opt/gurobi .
@@ -15,22 +15,17 @@ ENV LD_LIBRARY_PATH $GUROBI_HOME/lib
1515
RUN ln -s -f /usr/share/zoneinfo/America/New_York /etc/localtime
1616

1717
RUN apt-get update && apt-get install -qq -y \
18-
libglpk-dev\
18+
apt-file \
1919
python3-venv \
2020
python3-dev \
2121
python3-pip
2222

23-
RUN install2.r --error \
24-
roxygen2 \
25-
Rglpk \
26-
argparser
27-
23+
RUN R -e 'install.packages("pak", repos = sprintf("https://r-lib.github.io/p/pak/stable/%s/%s/%s", .Platform$pkgType, R.Version()$os, R.Version()$arch))'
24+
RUN R -e 'install.packages(c("rspm"))'
2825
RUN --mount=type=secret,id=GITHUB_TOKEN \
2926
export GITHUB_PAT="$(cat /run/secrets/GITHUB_TOKEN)" && \
30-
R -e 'devtools::install_version("bettermc", version = "1.1.2")' && \
31-
R -e 'devtools::install_github("cmu-delphi/covidcast", ref = "evalcast", subdir = "R-packages/evalcast")' && \
32-
R -e 'devtools::install_github(repo="ryantibs/quantgen", subdir="quantgen")' && \
33-
R -e 'install.packages(list.files(path="/opt/gurobi/linux64/R/", pattern="^gurobi_.*[.]tar[.]gz$", full.names = TRUE), repos=NULL)'
27+
R -e 'rspm::enable(); pak::pkg_install(c("roxygen2", "Rglpk", "argparser", "gfkse/[email protected]", "cmu-delphi/covidcast/R-packages/evalcast@evalcast", "ryantibs/quantgen/quantgen"))'
28+
RUN R -e 'install.packages(list.files(path="/opt/gurobi/linux64/R/", pattern="^gurobi_.*[.]tar[.]gz$", full.names = TRUE), repos=NULL)'
3429

3530
WORKDIR /backfill_corrections/
3631
ADD ./delphiBackfillCorrection ./delphiBackfillCorrection/

0 commit comments

Comments
 (0)