Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating dockerfile for targets #12

Merged
merged 1 commit into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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