-
Notifications
You must be signed in to change notification settings - Fork 235
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3354 from PecanProject/docker-gha
start new docker build
- Loading branch information
Showing
18 changed files
with
725 additions
and
170 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,6 @@ ARG IMAGE_VERSION="latest" | |
# PECAN FOR MODEL BASE IMAGE | ||
# -------------------------------------------------------------------------- | ||
FROM pecan/base:${IMAGE_VERSION} | ||
LABEL maintainer="Tezan Sahu <[email protected]>" | ||
|
||
EXPOSE 8000 | ||
|
||
|
@@ -15,9 +14,7 @@ EXPOSE 8000 | |
# -------------------------------------------------------------------------- | ||
|
||
# COMMAND TO RUN | ||
RUN --mount=type=secret,id=github_token \ | ||
export GITHUB_PAT=`cat /run/secrets/github_token` \ | ||
&& apt-get update \ | ||
RUN apt-get update \ | ||
&& apt-get install libsodium-dev -y \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
&& Rscript -e "devtools::install_version('promises', '1.1.0')" \ | ||
|
@@ -35,7 +32,6 @@ ENV AUTH_REQ="TRUE" \ | |
SECRET_KEY_BASE="thisisnotasecret" | ||
|
||
WORKDIR /api/R | ||
|
||
CMD Rscript entrypoint.R | ||
|
||
COPY ./ /api | ||
|
||
CMD ["Rscript", "entrypoint.R"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,6 @@ | |
ARG IMAGE_VERSION="latest" | ||
ARG FROM_IMAGE="depends" | ||
FROM pecan/${FROM_IMAGE}:${IMAGE_VERSION} | ||
MAINTAINER Rob Kooper <[email protected]> | ||
|
||
# ---------------------------------------------------------------------- | ||
# PEcAn version information | ||
|
@@ -26,9 +25,7 @@ COPY models /pecan/models/ | |
# install all PEcAn packages | ||
# `make clean` is to remove artifacts copied in from host system | ||
# (e.g. basgra.so) | ||
RUN --mount=type=secret,id=github_token \ | ||
export GITHUB_PAT=`cat /run/secrets/github_token` \ | ||
&& cd /pecan \ | ||
RUN cd /pecan \ | ||
&& make clean \ | ||
&& make \ | ||
&& rm -rf /tmp/downloaded_packages | ||
|
@@ -38,7 +35,7 @@ WORKDIR /work | |
COPY web/workflow.R docker/base/rstudio.sh /work/ | ||
|
||
# COMMAND TO RUN | ||
CMD Rscript --vanilla workflow.R | tee workflow.Rout | ||
CMD ["bash", "-c", "Rscript --vanilla workflow.R | tee workflow.Rout"] | ||
|
||
# variables to store in docker image | ||
ENV PECAN_VERSION=${PECAN_VERSION} \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
FROM alpine | ||
MAINTAINER Rob Kooper <[email protected]> | ||
|
||
# name to use in the machines table FQDN when registering the data files | ||
ENV FQDN="" \ | ||
|
@@ -19,4 +18,4 @@ RUN apk --no-cache add bash curl rsync postgresql-client unzip \ | |
&& curl -s -o create_met_driver.tar.gz http://isda.ncsa.illinois.edu/~kooper/EBI/create_met_driver.tar.gz | ||
|
||
COPY add-data.sh add.util.sh /work/ | ||
CMD bash /work/add-data.sh | ||
CMD ["bash", "-c", "/work/add-data.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,8 +5,6 @@ ARG FROM_IMAGE="rocker/tidyverse" | |
# PECAN FOR MODEL BASE IMAGE | ||
# ---------------------------------------------------------------------- | ||
FROM ${FROM_IMAGE}:${R_VERSION} | ||
MAINTAINER Rob Kooper <[email protected]> | ||
|
||
|
||
# ---------------------------------------------------------------------- | ||
# INSTALL BINARY/LIBRARY DEPENDENCIES | ||
|
@@ -33,9 +31,7 @@ RUN apt-get update \ | |
# INSTALL DEPENDENCIES | ||
# ---------------------------------------------------------------------- | ||
COPY pecan.depends.R pecan_package_dependencies.csv pecan_deps_from_github.txt / | ||
RUN --mount=type=secret,id=github_token \ | ||
export GITHUB_PAT=`cat /run/secrets/github_token` \ | ||
&& Rscript -e "install.packages(c('desc', 'remotes'))" \ | ||
RUN Rscript -e "install.packages(c('desc', 'remotes'))" \ | ||
&& R_LIBS_USER='/usr/local/lib/R/site-library' Rscript /pecan.depends.R \ | ||
&& rm -rf /tmp/* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,6 @@ ARG IMAGE_VERSION="latest" | |
# compile bookdown to html | ||
# ---------------------------------------------------------------------- | ||
FROM pecan/base:${IMAGE_VERSION} AS pecandocs | ||
MAINTAINER Rob Kooper <[email protected]> | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y --no-install-recommends pandoc \ | ||
|
@@ -28,7 +27,6 @@ RUN make build | |
# copy html pages to container | ||
# ---------------------------------------------------------------------- | ||
FROM httpd | ||
MAINTAINER Rob Kooper <[email protected]> | ||
|
||
COPY docker/docs/index.html /usr/local/apache2/htdocs/ | ||
COPY --from=pecandocs /src/book_source/_book/ /usr/local/apache2/htdocs/docs/pecan/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,6 @@ ARG IMAGE_VERSION="latest" | |
# PECAN FOR MODEL BASE IMAGE | ||
# ---------------------------------------------------------------------- | ||
FROM pecan/base:${IMAGE_VERSION} | ||
MAINTAINER Rob Kooper <[email protected]> | ||
|
||
# ---------------------------------------------------------------------- | ||
# SETUP FOR PYTHON CODE | ||
|
@@ -24,4 +23,4 @@ ENV RABBITMQ_URI="amqp://guest:guest@rabbitmq/%2F" \ | |
|
||
# actual application that will be executed | ||
COPY executor.py /work/ | ||
CMD python3 /work/executor.py | ||
CMD ["python3", "/work/executor.py"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,6 @@ ARG IMAGE_VERSION="latest" | |
# PECAN FOR MODEL BASE IMAGE | ||
# ---------------------------------------------------------------------- | ||
FROM pecan/base:${IMAGE_VERSION} | ||
MAINTAINER Rob Kooper <[email protected]> | ||
|
||
# ---------------------------------------------------------------------- | ||
# SETUP FOR PYTHON CODE | ||
|
@@ -23,4 +22,4 @@ ENV RABBITMQ_URI="amqp://guest:guest@rabbitmq/%2F" \ | |
|
||
# actual application that will be executed | ||
COPY model.py /work/ | ||
CMD python3 /work/model.py | ||
CMD ["python3", "/work/model.py"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
FROM nginx:alpine | ||
MAINTAINER Rob Kooper <[email protected]> | ||
|
||
COPY nginx.conf /etc/nginx/conf.d/default.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
FROM php:8-apache | ||
MAINTAINER Rob Kooper <[email protected]> | ||
|
||
# ---------------------------------------------------------------------- | ||
# install rabbitmq and postgresql extentions | ||
|
Oops, something went wrong.