Skip to content

Commit

Permalink
Revise Dockerfile; rollback docker-meta
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonysena committed Feb 21, 2024
1 parent 1f22f00 commit 60f22ce
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release_docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
# Add Docker labels and tags
- name: Docker meta
id: docker_meta
uses: docker/metadata-action@v5
uses: crazy-max/ghaction-docker-meta@v1
with:
images: ${{ env.DOCKER_IMAGE }}
tag-match: v(.*)
Expand Down
25 changes: 9 additions & 16 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,12 @@ RUN install2.r --error --skipinstalled --repos "https://packagemanager.posit.co/
DatabaseConnector \
&& rm -rf /tmp/download_packages/ /tmp/*.rds

# Installing Strategus
RUN --mount=type=secret,id=build_github_pat \
cp /usr/local/lib/R/etc/Renviron /tmp/Renviron \
&& echo "GITHUB_PAT=$(cat /run/secrets/build_github_pat)" >> /usr/local/lib/R/etc/Renviron \
&& echo "DATABASECONNECTOR_JAR_FOLDER=/opt/hades/jdbc_drivers" >> /usr/local/lib/R/etc/Renviron \
&& R -e "remotes::install_github(repo = 'OHDSI/Strategus', upgrade = 'always')" \
&& cp /tmp/Renviron /usr/local/lib/R/etc/Renviron

# Installing Strategus Modules
RUN --mount=type=secret,id=build_github_pat \
cp /usr/local/lib/R/etc/Renviron /tmp/Renviron \
&& echo "GITHUB_PAT=$(cat /run/secrets/build_github_pat)" >> /usr/local/lib/R/etc/Renviron \
&& echo "INSTATIATED_MODULES_FOLDER=/home/ohdsi/strategus/modules" >> /usr/local/lib/R/etc/Renviron \
&& R -e "\
analysisSpecifications <- ParallelLogger::loadSettingsFromJson(fileName = system.file('testdata/analysisSpecification.json', package = 'Strategus')); \
Strategus::ensureAllModulesInstantiated(analysisSpecifications)"
# Installing Strategus & Strategus Modules - NOTE that the module path is in 2 places for now
RUN echo "INSTATIATED_MODULES_FOLDER=/home/ohdsi/strategus/modules" >> /usr/local/lib/R/etc/Renviron
ENV GITHUB_PAT=$/run/secrets/build_github_pat
RUN R <<EOF
Sys.setenv(INSTANTIATED_MODULES_FOLDER = "/home/ohdsi/strategus/modules")
remotes::install_github(repo = 'OHDSI/Strategus')
analysisSpecifications <- ParallelLogger::loadSettingsFromJson(fileName = system.file('testdata/analysisSpecification.json', package = 'Strategus'))
Strategus::ensureAllModulesInstantiated(analysisSpecifications)
EOF

0 comments on commit 60f22ce

Please sign in to comment.