Skip to content

Commit

Permalink
build(docker): #57 Build from recent image (#59)
Browse files Browse the repository at this point in the history
* build(docker): #57 Build from recent image

Build from a recent image from the public registry for
`workflow.transition.monitor`. While these images don't include the
pacta-data needed to prepare indices, the current README instructions
include a requirement to externally mount PACTA-data.

Closes: #57

* build(docker): #57 inherit settings from base image

* docs(docker): #57 Update readme

* Update README.md

Co-authored-by: CJ Yetman <[email protected]>

* chore(docker): #57 Clean comments

---------

Co-authored-by: CJ Yetman <[email protected]>
  • Loading branch information
AlexAxthelm and cjyetman authored Feb 27, 2024
1 parent a17b18a commit fb550b1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 16 deletions.
14 changes: 2 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
# using rocker r-vers as a base with R 4.2.3
# https://hub.docker.com/r/rocker/r-ver
# https://rocker-project.org/images/versioned/r-ver.html
#
# sets CRAN repo to use Posit Package Manager to freeze R package versions to
# those available on 2023-03-31
# https://packagemanager.rstudio.com/client/#/repos/2/overview
# https://packagemanager.rstudio.com/cran/__linux__/jammy/2023-03-31+MbiAEzHt

FROM transitionmonitordockerregistry.azurecr.io/rmi_pacta:2021q4_1.0.0
ARG CRAN_REPO="https://packagemanager.posit.co/cran/__linux__/jammy/2023-10-30"
RUN echo "options(repos = c(CRAN = '$CRAN_REPO'))" >> "${R_HOME}/etc/Rprofile.site"
FROM ghcr.io/rmi-pacta/workflow.transition.monitor:main
# inherit CRAN REPO and R options from base image

# Install R dependencies
COPY DESCRIPTION /workflow.prepare.pacta.indices/DESCRIPTION
Expand Down
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,17 @@ The goal of `workflow.prepare.pacta.indices` is to run indices through PACTA,
and format them for the Transition Monitor webtool.

## Running Prepare PACTA Indices workflow

### Required input

The index preparation Dockerfile uses the `transitionmonitordockerregistry/rmi_pacta` docker image as a base image. Pulling this image requires access to the Azure docker registry `transitionmonitordockerregistry`.
The index preparation Dockerfile uses the `ghcr.io/rmi-pacta/workflow.transition.monitor` docker image as a base image.
Although the image is public, pulling public images from GHCR requires authentication.

You can authenticate to GHCR with any valid GitHub Personal Access token

You can log-in to this registry by calling:
``` bash
az acr login --name transitionmonitordockerregistry
```
echo $GITHUB_PAT | docker login ghcr.io -u <USERNAME> --password-stdin
```

### Running in Docker
The simplest way to run the data preparation process is by using docker.
Expand Down

0 comments on commit fb550b1

Please sign in to comment.