Skip to content

Commit

Permalink
Merge pull request #12 from eco4cast/targets-docker
Browse files Browse the repository at this point in the history
Creating dockerfile for targets
  • Loading branch information
jzwart authored Dec 20, 2023
2 parents 83d6aca + 6581264 commit 73dac9b
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 37 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: build docker container
name: build targets docker container

on:
workflow_dispatch:
Expand All @@ -24,5 +24,6 @@ jobs:
uses: docker/build-push-action@v3
with:
push: true
tags: eco4cast/rocker-neon4cast:latest
tags: eco4cast/usgsrc4cast-targets:latest
build-args: GITHUB_PAT=${{ secrets.PAT }}
file: targets/Dockerfile
3 changes: 1 addition & 2 deletions .github/workflows/targets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,13 @@ jobs:
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY_SUBMISSIONS }}
OSN_KEY: ${{ secrets.OSN_KEY }}
OSN_SECRET: ${{ secrets.OSN_SECRET }}
container: rocker/geospatial:latest
container: eco4cast/usgsrc4cast-targets:latest
steps:
- uses: actions/checkout@v3

- name: Generate targets
shell: Rscript {0}
run: |
install.packages(c("clustermq", "dataRetrieval", "RCurl", "tarchetypes", "targets"))
setwd("targets")
targets::tar_make()
33 changes: 0 additions & 33 deletions Dockerfile

This file was deleted.

21 changes: 21 additions & 0 deletions targets/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM eco4cast/rocker-neon4cast:latest

# Import GitHub Secret
ARG GITHUB_PAT
ENV GITHUB_PAT=$GITHUB_PAT

# Declares build arguments
# ARG NB_USER
# ARG NB_UID

# COPY --chown=${NB_USER} . ${HOME}

#USER ${NB_USER}
RUN install2.r --error \
clustermq \
dataRetrieval \
tarchetypes \
targets \
&& rm -rf /tmp/downloaded_packages /tmp/*.rds /tmp/Rtmp*

COPY cron.sh /etc/services.d/cron/run

0 comments on commit 73dac9b

Please sign in to comment.