Skip to content

Commit

Permalink
update dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
jzwart committed Jun 5, 2024
1 parent 5af5275 commit ac37e4f
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 39 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker_R_binder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
with:
ref: binder-R
ref: main
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
Expand Down
67 changes: 29 additions & 38 deletions binder/R/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,46 +1,37 @@
FROM rocker/binder:latest

#USER root
RUN apt-get update && apt-get -y install cron
RUN apt-get update && apt-get -y install jags
RUN apt-get update && apt-get -y install libgd-dev
RUN apt-get update && apt-get -y install libnetcdf-dev
# Ensure the commands are run as root user
USER root

RUN sudo update-ca-certificates

#USER ${NB_USER}

RUN apt-get -y install python3 python3-pip
# Update the package list and install required packages
RUN rm -rf /var/lib/apt/lists/* && \
apt-get update && \
apt-get -y install cron jags libgd-dev libnetcdf-dev python3 python3-pip && \
apt-get clean && \
sudo update-ca-certificates

# Install R packages
RUN install2.r devtools remotes reticulate

RUN R -e "remotes::install_github('cboettig/minioclient')"
RUN sleep 180
RUN R -e "remotes::install_github('eco4cast/stac4cast')"
RUN sleep 180
RUN R -e "remotes::install_github('eco4cast/EFIstandards')"
RUN sleep 180
RUN R -e "remotes::install_github('cboettig/aws.s3')"
RUN sleep 180
RUN R -e "remotes::install_github('eco4cast/score4cast')"
RUN sleep 180
RUN R -e "remotes::install_github('EcoForecast/ecoforecastR')"
RUN sleep 180
RUN R -e "remotes::install_github('eco4cast/neon4cast')"
RUN sleep 180
RUN R -e "remotes::install_github('cboettig/prov')"
RUN sleep 180
RUN R -e "remotes::install_github('eco4cast/read4cast')"
RUN sleep 180
RUN R -e "remotes::install_github('eco4cast/gefs4cast')"
RUN sleep 180
RUN R -e "remotes::install_github('mitchelloharawild/distributional', ref = 'bb0427e')"

RUN install2.r arrow renv rjags neonstore ISOweek RNetCDF fable fabletools forecast imputeTS duckdbfs gsheet

RUN install2.r ncdf4 scoringRules tidybayes tidync udunits2 bench contentid yaml RCurl here feasts future furrr jsonlite

#RUN R -e "reticulate::install_python(version = '3.9:latest', list = FALSE, force = FALSE)"

# Install R packages from GitHub
RUN R -e "remotes::install_github('cboettig/minioclient')" && \
R -e "remotes::install_github('eco4cast/stac4cast')" && \
R -e "remotes::install_github('eco4cast/EFIstandards')" && \
R -e "remotes::install_github('cboettig/aws.s3')" && \
R -e "remotes::install_github('eco4cast/score4cast')" && \
R -e "remotes::install_github('EcoForecast/ecoforecastR')" && \
R -e "remotes::install_github('eco4cast/neon4cast')" && \
R -e "remotes::install_github('cboettig/prov')" && \
R -e "remotes::install_github('eco4cast/read4cast')" && \
R -e "remotes::install_github('eco4cast/gefs4cast')" && \
R -e "remotes::install_github('mitchelloharawild/distributional', ref = 'bb0427e')"

# Install additional R packages
RUN install2.r arrow renv rjags neonstore ISOweek RNetCDF fable fabletools forecast imputeTS duckdbfs gsheet && \
install2.r ncdf4 scoringRules tidybayes tidync udunits2 bench contentid yaml RCurl here feasts future furrr jsonlite

# Copy cron script
COPY cron.sh /etc/services.d/cron/run

# Switch back to the default user if necessary
# USER ${NB_USER}

0 comments on commit ac37e4f

Please sign in to comment.