Skip to content
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
12 changes: 12 additions & 0 deletions flavors/tempsed-wadden-sea/cell-build.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM mambaorg/micromamba:2.0.7

RUN micromamba install -y -n base -c conda-forge conda-pack && \
micromamba clean --all --yes

ARG CONDA_ENV_FILE
COPY --chown=mambauser:mambauser ${CONDA_ENV_FILE?} environment.yaml
RUN micromamba create -y -n venv -f environment.yaml && \
micromamba clean --all --yes

COPY ./flavors/tempsed-wadden-sea/install_packages.R .
RUN micromamba run -n venv bash -c "Rscript install_packages.R"
55 changes: 55 additions & 0 deletions flavors/tempsed-wadden-sea/environment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: tempsed-wadden-sea
channels:
- conda-forge
dependencies:
# naavre-fl-*-cell-build
- r-jsonlite=1.9.1
- r-optparse=1.7.5
# naavre-fl-*-jupyter
- ipykernel=6.29.5
- r-irkernel=1.3.2
# user packages for all flavors
- git=2.49.0
- jq>=1.8
- minio=7.2.15
- pip=25.0.1
- python>=3.8
- r=4.4
- r-secretsprovider
- r-getpass
- r-aws.s3
# user packages for this flavor
- r-dplyr
- r-tidyr
- r-purrr
- r-lubridate
- r-ggplot2
- r-sf
- r-terra
- r-zoo
- r-data.table
- r-fasttime
- r-rcpp
- r-rcpproll
- r-ggrepel
- r-generics
- r-cli
- r-rcpparmadillo
- r-pak
- r-devtools
- r-remotes
- pandas
- geopandas
- matplotlib
- rasterio
# Dependencies for TempSED
- r-desolve
- r-rootsolve
- r-plot3d
- r-shape
- pip:
# user packages for all flavors
- SecretsProvider
# user packages for this flavor
- rws-ddlpy

5 changes: 5 additions & 0 deletions flavors/tempsed-wadden-sea/flavor_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
flavor_name: tempsed-wadden-sea
build_jupyter: True
build_cell_base: True
free_disk_space: False
aliases: []
15 changes: 15 additions & 0 deletions flavors/tempsed-wadden-sea/install_packages.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
install.packages("ReacTran", repos="https://cran.r-project.org", dependencies = FALSE)
library("ReacTran")

install.packages("grDevices", repos="https://cran.r-project.org", dependencies = FALSE)
library("grDevices")

install.packages("heatwaveR", repos="https://cran.r-project.org", dependencies = FALSE)
library("heatwaveR")

install.packages("tidyterra", repos="https://cran.r-project.org", dependencies = FALSE)
library("tidyterra")

devtools::install_github('TempSED/TempSED', build_vignettes = TRUE, dependencies = FALSE)
require('TempSED')

23 changes: 23 additions & 0 deletions flavors/tempsed-wadden-sea/jupyter.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM quay.io/jupyter/minimal-notebook:lab-4.3.6

COPY --chown=jovyan:jovyan ./docker/jupyter.requirements.txt requirements.txt
RUN pip install -r requirements.txt

# nb_conda_kernels for auto-discovery of kernels in other conda environments
RUN mamba install --yes "nb_conda_kernels>=2.5.0" && \
mamba clean --all --yes

# Disable "Would you like to get notified about official Jupyter news?"
# https://jupyterlab.readthedocs.io/en/stable/user/announcements.html
RUN jupyter labextension disable "@jupyterlab/apputils-extension:announcements"

ARG CONDA_ENV_FILE
COPY --chown=jovyan:jovyan ${CONDA_ENV_FILE?} environment.yaml
RUN mamba env create --yes -f environment.yaml && \
mamba clean --all --yes
RUN echo '{"CondaKernelSpecManager": {"env_filter": "/opt/conda$", "conda_only": true}}' >> /home/jovyan/.jupyter/jupyter_config.json

RUN mkdir -p /tmp/data

COPY ./flavors/tempsed-wadden-sea/install_packages.R .
RUN mamba run -n tempsed-wadden-sea bash -c "Rscript install_packages.R"
7 changes: 7 additions & 0 deletions flavors/tempsed-wadden-sea/tests/tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
set -e
# activate environment in cell-test or in jupyter image
source /venv/bin/activate || eval "$(conda shell.bash activate tempsed-wadden-sea)"
dir="${0%/*}"
find "$dir" -name "*.py" -print0 | xargs --null -I "{}" python "{}"
find "$dir" -name "*.R" -print0 | xargs --null -I "{}" Rscript "{}"
Loading