From b3ff1cdedfca94cdefd1a53318446ded2eab7115 Mon Sep 17 00:00:00 2001 From: zequihg50 Date: Thu, 22 Apr 2021 09:35:02 +0200 Subject: [PATCH 01/21] Fix docker build command --- docker/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/README.md b/docker/README.md index cf6cdab..1c5c71a 100644 --- a/docker/README.md +++ b/docker/README.md @@ -36,7 +36,7 @@ Write http://firstchoice:8888/ or http://secondchoice:8888/ in your browser and ### Build (only for the admin) ```bash -docker build -t santandermetgroup/climate4r:latest . < Dockerfile +docker build -t santandermetgroup/climate4r:latest -f Dockerfile . docker login docker push santandermetgroup/climate4r:latest ``` From 4ad9485d69371c4e79db7e97a18138d025f5406e Mon Sep 17 00:00:00 2001 From: zequihg50 Date: Thu, 13 May 2021 17:22:39 +0200 Subject: [PATCH 02/21] Include conda env from antonio --- conda-full/README.md | 19 ++----- conda-full/build.sh | 37 +------------ conda-full/install.R | 28 ++++++++++ conda-full/meta.yaml | 126 +++++++++++++++++++++++++++---------------- 4 files changed, 114 insertions(+), 96 deletions(-) create mode 100644 conda-full/install.R diff --git a/conda-full/README.md b/conda-full/README.md index 374aee9..90e8f9d 100644 --- a/conda-full/README.md +++ b/conda-full/README.md @@ -1,24 +1,13 @@ -## conda recipe for climate4R +# conda recipe for climate4R ```bash -# create a conda environment -conda create --name nameofmycondaenvironment -# activate the environment -conda activate nameofmycondaenvironment -# install climate4R -conda install -c defaults -c r -c conda-forge -c santandermetgroup climate4r=1.4.0 +conda install -c santandermetgroup -c conda-forge -c r -c defaults climate4r=1.5.0 ``` -Activate the conda environment to work with climate4R. To deactivate the environment run the following: -```bash -# deactivate the environment -conda deactivate -``` - -### Build (only for the admin) +## Build (only for the admin) ```bash -conda build -c defaults -c r -c conda-forge . +conda build -c conda-forge -c r -c defaults . anaconda login anaconda upload -u SantanderMetGroup TAR_BZ2 ``` diff --git a/conda-full/build.sh b/conda-full/build.sh index 72ace5e..b1a81fa 100644 --- a/conda-full/build.sh +++ b/conda-full/build.sh @@ -1,36 +1 @@ -# for convertR -export UDUNITS2_LIB=${PREFIX}/lib -export UDUNITS2_INCLUDE=${PREFIX}/include -export CPATH=${PREFIX}/include - -# for rjava -export LD_LIBRARY_PATH=${PREFIX}/lib:${PREFIX}/lib/server:$PREFIX/lib/R/library/rJava/libs:$PREFIX/jre/lib/amd64/server - -R --vanilla -e 'install.packages("devtools", repos="https://cloud.r-project.org/")' -R --vanilla -e "install.packages('udunits2', repos='https://cloud.r-project.org/', configure.args='--with-udunits2-lib=${UDUNITS2_LIB}')" -#R --vanilla -e 'install.packages("rJava", repos="https://cloud.r-project.org/")' -#R --vanilla -e 'install.packages("ncdf4", repos="https://cloud.r-project.org/")' -#R --vanilla -e 'install.packages("gh", repos="https://cloud.r-project.org/")' -#R --vanilla -e 'install.packages("matrix", repos="https://cloud.r-project.org/")' -#R --vanilla -e 'install.packages("geojsonio", repos="https://cloud.r-project.org/")' -#R --vanilla -e 'install.packages("rgdal", repos="https://cloud.r-project.org/")' -R --vanilla -e 'install.packages("https://cran.r-project.org/src/contrib/Archive/tree/tree_1.0-38.tar.gz")' -R --vanilla -e 'library(devtools);install_github("SantanderMetGroup/climate4R.UDG@v0.2.0")' -R --vanilla -e 'library(devtools);install_github("SantanderMetGroup/loadeR.java@v1.1.1")' -R --vanilla -e 'library(devtools);install_github("SantanderMetGroup/loadeR@v1.7.0")' -R --vanilla -e 'library(devtools);install_github("SantanderMetGroup/loadeR.ECOMS@v1.4.6")' -R --vanilla -e 'library(devtools);install_github("SantanderMetGroup/transformeR@v2.0.1")' -R --vanilla -e 'library(devtools);install_github("SantanderMetGroup/downscaleR.keras@v0.0.2")' -R --vanilla -e 'library(devtools);install_github("SantanderMetGroup/downscaleR@v3.3.1")' -R --vanilla -e 'library(devtools);install_github("SantanderMetGroup/visualizeR@v1.6.0")' -R --vanilla -e 'library(devtools);install_github("SantanderMetGroup/convertR@v0.2.0")' -R --vanilla -e 'library(devtools);install_github("SantanderMetGroup/geoprocessoR@v0.2.0")' -R --vanilla -e 'library(devtools);install_github("SantanderMetGroup/climate4R.climdex@v0.2.1")' -R --vanilla -e 'library(devtools);install_github("SantanderMetGroup/climate4R.indices@v0.1.0")' -R --vanilla -e 'library(devtools);install_github("SantanderMetGroup/loadeR.2nc@v0.1.1")' -R --vanilla -e 'library(devtools);install_github("SantanderMetGroup/fireDanger@v1.1.0")' -R --vanilla -e 'library(devtools);install_github("SantanderMetGroup/VALUE@v2.2.1")' -R --vanilla -e 'library(devtools);install_github("SantanderMetGroup/climate4R.value@v0.0.2")' -R --vanilla -e 'library(devtools);install_github("SantanderMetGroup/mopa@v1.0.0")' -R --vanilla -e 'library(devtools);install_github("SantanderMetGroup/drought4R@v0.2.0")' -R --vanilla -e 'library(devtools);install_github("SantanderMetGroup/climate4R.datasets@v0.0.1")' +Rscript install.R diff --git a/conda-full/install.R b/conda-full/install.R new file mode 100644 index 0000000..955fa64 --- /dev/null +++ b/conda-full/install.R @@ -0,0 +1,28 @@ +package.version <- list( + climate4R.UDG = "0.2.0", + loadeR.java = "1.1.1", + loadeR = "1.7.0", + loadeR.ECOMS = "1.4.6", + transformeR = "2.1.0", + downscaleR = "3.3.2", + downscaleR.keras = "1.0.0", + visualizeR = "1.6.0", + convertR = "0.2.0", + geoprocessoR = "0.2.0", + climate4R.climdex = "0.2.1", + climate4R.indices = "0.1.0", + loadeR.2nc = "0.1.1", + fireDanger = "1.1.0", + VALUE = "2.2.1", + climate4R.value = "0.0.2", + mopa = "1.0.0", + drought4R = "0.2.0", + climate4R.datasets = "0.0.1" +) +for (pkg in names(package.version)) { + tarball = sprintf("https://github.com/SantanderMetGroup/%s/archive/refs/tags/v%s.tar.gz", pkg, package.version[[pkg]]) + if(!require(pkg, character.only = TRUE)){ # to avoid download and install already installed packages + install.packages(tarball, repos = NULL) + require(pkg, character.only = TRUE) + } +} diff --git a/conda-full/meta.yaml b/conda-full/meta.yaml index 539d75d..38d2132 100644 --- a/conda-full/meta.yaml +++ b/conda-full/meta.yaml @@ -1,55 +1,91 @@ package: name: climate4r - version: 1.4.1 + version: 1.5.0 -build: - script_env: - - GITHUB_PAT - rpaths: - - lib/R/lib/ - - lib/ +source: + url: file://{{ RECIPE_DIR }}/install.R requirements: build: - - r-base=3.6.1 - - r-rjava - - openjdk - - gdal>=3 - - poppler - - xorg-libxt - - udunits2 - - curl - - zstd - - libv8 - - jq - - protobuf - - geojson - - libiconv - - geojsonio - - proj4 - - pkg-config - - libiconv - - libgomp + - nbgitpuller + - r-base=3.6 + - r-caret=6.0 + - r-dismo=1.3 + - r-spatstat=1.64 + - r-padr=0.5 + - r-presenceabsence=1.1 + - r-deepnet=0.2 + - r-splancs=2.01 + - r-gtools=3.8 + - r-spei=1.7 + - r-tree=1.0 + - r-rmarkdown=2.8 + - r-devtools=2.4 + - r-spatstat.linnet=1.65 + - r-sampling=2.9 + - r-geosphere=1.5 + - r-randomforest=4.6 + - r-keras=2.4 + - r-rcurl=1.98 + - r-e1071=1.7 + - r-mapplots=1.5 + - r-vioplot=0.3 + - r-akima=0.6 + - r-ncdf4=1.17 + - r-glmnet=4.1 + - r-latticeextra=0.6 + - r-rjava=1.0 + - r-sticky=0.5 + - r-verification=1.42 + - r-udunits2=0.13 + - r-easyverification=0.4 + - r-kohonen=3.0 + - r-ranger=0.12 + - r-climdex.pcic=1.1 + - r-gdalutils=2.0 + - r-evd=2.3 + - r-signal=0.7 + - r-earth=5.3 run: - - r-base=3.6.1 - - r-rjava - - openjdk - - gdal>=3 - - poppler - - xorg-libxt - - udunits2 - - curl - - zstd - - libv8 - - jq - - protobuf - - geojson - - libiconv - - geojsonio - - proj4 - - pkg-config - - libiconv - - libgomp + - nbgitpuller + - r-base=3.6 + - r-caret=6.0 + - r-dismo=1.3 + - r-spatstat=1.64 + - r-padr=0.5 + - r-presenceabsence=1.1 + - r-deepnet=0.2 + - r-splancs=2.01 + - r-gtools=3.8 + - r-spei=1.7 + - r-tree=1.0 + - r-rmarkdown=2.8 + - r-devtools=2.4 + - r-spatstat.linnet=1.65 + - r-sampling=2.9 + - r-geosphere=1.5 + - r-randomforest=4.6 + - r-keras=2.4 + - r-rcurl=1.98 + - r-e1071=1.7 + - r-mapplots=1.5 + - r-vioplot=0.3 + - r-akima=0.6 + - r-ncdf4=1.17 + - r-glmnet=4.1 + - r-latticeextra=0.6 + - r-rjava=1.0 + - r-sticky=0.5 + - r-verification=1.42 + - r-udunits2=0.13 + - r-easyverification=0.4 + - r-kohonen=3.0 + - r-ranger=0.12 + - r-climdex.pcic=1.1 + - r-gdalutils=2.0 + - r-evd=2.3 + - r-signal=0.7 + - r-earth=5.3 about: home: https://github.com/SantanderMetGroup/climate4R From 4bce88e868b79cf899797a781c76eab6adcc14cf Mon Sep 17 00:00:00 2001 From: zequihg50 Date: Wed, 19 May 2021 10:37:40 +0200 Subject: [PATCH 03/21] Added mamba doc for recipe --- conda-full/README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/conda-full/README.md b/conda-full/README.md index 90e8f9d..87a2e36 100644 --- a/conda-full/README.md +++ b/conda-full/README.md @@ -11,3 +11,19 @@ conda build -c conda-forge -c r -c defaults . anaconda login anaconda upload -u SantanderMetGroup TAR_BZ2 ``` + +## ToDo, explore mamba and boa + +[mamba](https://github.com/mamba-org/mamba) and [boa](https://github.com/mamba-org/boa) + +Install: + +```bash +conda install mamba -n base -c conda-forge +``` + +Build: + +```bash +conda mambabuild -c conda-forge -c r -c defaults . +``` From 4b759642bde11049d2fc4d7a20ed1ec5039d19b1 Mon Sep 17 00:00:00 2001 From: zequihg50 Date: Tue, 1 Jun 2021 18:12:25 +0200 Subject: [PATCH 04/21] Update dockerfile to 1.5.0 --- docker/Dockerfile | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index a79ceb6..b6d55e5 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,26 +1,15 @@ FROM jupyter/base-notebook:latest -USER root -RUN apt-get update && apt-get install -y xorg git && ln -s /bin/tar /bin/gtar - -USER $NB_USER -RUN conda install -y -c defaults -c conda-forge -c santandermetgroup python=3.6 climate4r=1.4.1 \ - jupyter_contrib_nbextensions jupyter_nbextensions_configurator && \ - cp /opt/conda/lib/libgomp.so.1.0.0 /opt/conda/lib/libgomp.so - -ENV PROJ_LIB /opt/conda/share/proj -RUN R --vanilla -e 'install.packages("https://cran.r-project.org/src/contrib/Archive/foreign/foreign_0.8-64.tar.gz")' && \ - R --vanilla -e 'install.packages(c("crayon", "pbdZMQ", "classInt", "geojsonio"), repos="https://cloud.r-project.org/")' && \ - R --vanilla -e 'library(devtools);install_github("IRkernel/repr")' && \ - R --vanilla -e 'library(devtools);install_github("IRkernel/IRdisplay")' && \ - R --vanilla -e 'library(devtools);install_github("IRkernel/IRkernel")' && \ - chown -R jovyan:users /home/jovyan && \ - R --vanilla -e 'IRkernel::installspec()' - -USER root -RUN R --vanilla -e 'IRkernel::installspec(user = FALSE)' && \ +USER root +RUN apt-get update && apt-get install -y xorg git && \ mkdir -p /gpfs/ces/share-7c11c2a4-9d9f-40f5-b95e-396bcbf3f608 && \ mkdir -p /home/$NB_USER/shared && \ chown -R $NB_USER:users /gpfs /home/$NB_USER/shared && \ ln -s /home/$NB_USER/shared /gpfs/ces/share-7c11c2a4-9d9f-40f5-b95e-396bcbf3f608/HUB + USER $NB_USER +RUN conda install mamba -y -n base -c conda-forge && \ + mamba install -y -c santandermetgroup -c conda-forge -c r -c defaults climate4r=1.5.0 \ + jupyter_contrib_nbextensions jupyter_nbextensions_configurator r-irkernel && \ + chown -R jovyan:users /home/jovyan && \ + R --vanilla -e 'IRkernel::installspec()' From 4a57df3e07e940bba720a200760f35c3bbc0f9c9 Mon Sep 17 00:00:00 2001 From: Jesus Fernandez Date: Fri, 4 Jun 2021 10:51:15 +0200 Subject: [PATCH 05/21] Update README (conda as preferred install method) --- README.md | 44 +++++++++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index ac6e3f2..19f47a2 100644 --- a/README.md +++ b/README.md @@ -48,8 +48,33 @@ Moreover, there is a [notebook repository](https://github.com/SantanderMetGroup/ ## Installation +The `climate4R` framework relies on a wealth of other R packages and bindings to third-party libraries. Therefore, the recommended installation is through the conda package below, which ensures the proper installation of all dependencies. + +### Installation using miniconda: + +[Miniconda](https://docs.conda.io/en/latest/miniconda.html) is a free minimal installer for conda. The [conda recipe](conda) installs an up-to-date version of the different packages composing the `climate4R` framework, along with the associated library dependencies (udunits, openjdk, netcdf Java etc.), avoiding potential problems like the R-java configuration etc. Note that the appropriate miniconda distribution must be installed (go to the [miniconda installers page](https://docs.conda.io/en/latest/miniconda.html)) before running the following commands. We recommend starting from a clean environment (named climate4R in this example): + +```bash +conda create --name climate4R +conda activate climate4R +``` + +In this environment, install `climate4R` by issuing: + +```bash +conda install -c defaults -c r -c conda-forge -c santandermetgroup climate4r +``` + +Activate the conda environment to work with climate4R. Deactivate the environment with: + +```bash +conda deactivate +``` + ### Direct package installation from github: +Individual packages can be installed directly from the github sources. + ``` r > library(devtools) > install_github(c("SantanderMetGroup/loadeR.java", @@ -60,25 +85,6 @@ Moreover, there is a [notebook repository](https://github.com/SantanderMetGroup/ "SantanderMetGroup/downscaleR")) ``` -### Installation using miniconda: - -[Miniconda](https://docs.conda.io/en/latest/miniconda.html) is a free minimal installer for conda. Using the [conda recipe](https://github.com/SantanderMetGroup/climate4R/tree/master/conda) it is possible to install an up-to-date version of the different packages composing the `climate4R` framework, and all the associated library dependencies (udunits, openjdk, netcdf Java etc.), avoiding some possible problems like the R-java configuration etc. Note that the appropriate miniconda distribution must be installed before running the command (go to the [miniconda installers page](https://docs.conda.io/en/latest/miniconda.html)): - -```bash -# create a conda environment -conda create --name nameofmycondaenvironment -# activate the environment -conda activate nameofmycondaenvironment -# install climate4R -conda install -c defaults -c r -c conda-forge -c santandermetgroup climate4r -``` -Activate the conda environment to work with climate4R. To deactivate the environment run the following: - -```bash -# deactivate the environment -conda deactivate nameofmycondaenvironment -``` - ### NOTE: installation of specific package versions In case a particular paper notebook is to be replicated, the installation of specific version tags can be done by just explicitly indicating the tag number in the repo name. For example: From 0b0217def5c23d96a662877508b5e41d11f3dd64 Mon Sep 17 00:00:00 2001 From: zequihg50 Date: Tue, 15 Jun 2021 18:48:52 +0200 Subject: [PATCH 06/21] upgraded docker to 1.5.1 (added python packages) --- docker/Dockerfile | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index b6d55e5..5ef806e 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -2,14 +2,16 @@ FROM jupyter/base-notebook:latest USER root RUN apt-get update && apt-get install -y xorg git && \ - mkdir -p /gpfs/ces/share-7c11c2a4-9d9f-40f5-b95e-396bcbf3f608 && \ - mkdir -p /home/$NB_USER/shared && \ + mkdir -p /gpfs/ces/share-7c11c2a4-9d9f-40f5-b95e-396bcbf3f608 /home/$NB_USER/shared /gpfs/projects/meteo/IPCC/ATLAS && \ chown -R $NB_USER:users /gpfs /home/$NB_USER/shared && \ - ln -s /home/$NB_USER/shared /gpfs/ces/share-7c11c2a4-9d9f-40f5-b95e-396bcbf3f608/HUB + ln -s /home/$NB_USER/shared /gpfs/ces/share-7c11c2a4-9d9f-40f5-b95e-396bcbf3f608/HUB && \ + ln -s /home/$NB_USER/shared /gpfs/projects/meteo/IPCC/ATLAS/hub USER $NB_USER RUN conda install mamba -y -n base -c conda-forge && \ - mamba install -y -c santandermetgroup -c conda-forge -c r -c defaults climate4r=1.5.0 \ - jupyter_contrib_nbextensions jupyter_nbextensions_configurator r-irkernel && \ - chown -R jovyan:users /home/jovyan && \ + mamba install -y -c santandermetgroup -c conda-forge -c r -c defaults \ + climate4r=1.5.0 \ + xarray pandas matplotlib cartopy netcdf4 cftime dask iris \ + jupyter_contrib_nbextensions jupyter_nbextensions_configurator r-irkernel && \ + chown -R jovyan:users /home/jovyan && \ R --vanilla -e 'IRkernel::installspec()' From a4800eca4273081e2978d1d4718df5aa9bc11a13 Mon Sep 17 00:00:00 2001 From: zequihg50 Date: Mon, 28 Jun 2021 14:11:15 +0200 Subject: [PATCH 07/21] Added python dependencies and using mambabuild --- conda-full/README.md | 2 + conda-full/meta.yaml | 514 ++++++++++++++++++++++++++++++++++++------- 2 files changed, 438 insertions(+), 78 deletions(-) diff --git a/conda-full/README.md b/conda-full/README.md index 87a2e36..12ff3fe 100644 --- a/conda-full/README.md +++ b/conda-full/README.md @@ -6,6 +6,8 @@ conda install -c santandermetgroup -c conda-forge -c r -c defaults climate4r=1.5 ## Build (only for the admin) +Use mambabuild, see below. + ```bash conda build -c conda-forge -c r -c defaults . anaconda login diff --git a/conda-full/meta.yaml b/conda-full/meta.yaml index 38d2132..e05d452 100644 --- a/conda-full/meta.yaml +++ b/conda-full/meta.yaml @@ -7,85 +7,443 @@ source: requirements: build: - - nbgitpuller - - r-base=3.6 - - r-caret=6.0 - - r-dismo=1.3 - - r-spatstat=1.64 - - r-padr=0.5 - - r-presenceabsence=1.1 - - r-deepnet=0.2 - - r-splancs=2.01 - - r-gtools=3.8 - - r-spei=1.7 - - r-tree=1.0 - - r-rmarkdown=2.8 - - r-devtools=2.4 - - r-spatstat.linnet=1.65 - - r-sampling=2.9 - - r-geosphere=1.5 - - r-randomforest=4.6 - - r-keras=2.4 - - r-rcurl=1.98 - - r-e1071=1.7 - - r-mapplots=1.5 - - r-vioplot=0.3 - - r-akima=0.6 - - r-ncdf4=1.17 - - r-glmnet=4.1 - - r-latticeextra=0.6 - - r-rjava=1.0 - - r-sticky=0.5 - - r-verification=1.42 - - r-udunits2=0.13 - - r-easyverification=0.4 - - r-kohonen=3.0 - - r-ranger=0.12 - - r-climdex.pcic=1.1 - - r-gdalutils=2.0 - - r-evd=2.3 - - r-signal=0.7 - - r-earth=5.3 + - numpy + - pandas + - dask + - iris + + - r-abind + - r-akima + - r-askpass + - r-assertthat + - r-backports + - r-base>=3.6 + - r-base64enc + - r-bitops + - r-boot + - r-brew + - r-brio + - r-cachem + - r-callr + - r-caret + - r-circstats + - r-class + - r-cli + - r-climdex.pcic + - r-clipr + - r-codetools + - r-colorspace + - r-commonmark + - r-config + - r-covr + - r-crayon + - r-credentials + - r-crosstalk + - r-curl + - r-data.table + - r-deepnet + - r-deldir + - r-desc + - r-devtools + - r-diffobj + - r-digest + - r-dismo + - r-dotcall64 + - r-dplyr + - r-dt + - r-dtw + - r-e1071 + - r-earth + - r-easyverification + - r-ellipsis + - r-evaluate + - r-evd + - r-fansi + - r-farver + - r-fastmap + - r-fields + - r-foreach + - r-formula + - r-fs + - r-gdalutils + - r-generics + - r-geosphere + - r-gert + - r-ggplot2 + - r-gh + - r-git2r + - r-gitcreds + - r-glmnet + - r-glue + - r-goftest + - r-gower + - r-gridextra + - r-gtable + - r-gtools + - r-highr + - r-htmltools + - r-htmlwidgets + - r-httr + - r-ini + - r-ipred + - r-isoband + - r-iterators + - r-jpeg + - r-jsonlite + - r-keras + - r-kernsmooth + - r-knitr + - r-kohonen + - r-labeling + - r-later + - r-lattice + - r-latticeextra + - r-lava + - r-lazyeval + - r-lifecycle + - r-lmomco + - r-lmoments + - r-lpsolve + - r-lubridate + - r-magrittr + - r-mapplots + - r-maps + - r-markdown + - r-mass + - r-matrix + - r-memoise + - r-mgcv + - r-mime + - r-modelmetrics + - r-munsell + - r-ncdf4 + - r-nlme + - r-nnet + - r-numderiv + - r-openssl + - r-padr + - r-pbapply + - r-pcict + - r-pillar + - r-pkgbuild + - r-pkgconfig + - r-pkgload + - r-plotmo + - r-plotrix + - r-plyr + - r-png + - r-polyclip + - r-praise + - r-presenceabsence + - r-prettyunits + - r-proc + - r-processx + - r-prodlim + - r-promises + - r-proxy + - r-ps + - r-purrr + - r-r.methodss3 + - r-r.oo + - r-r.utils + - r-r6 + - r-randomforest + - r-ranger + - r-rappdirs + - r-raster + - r-rcmdcheck + - r-rcolorbrewer + - r-rcpp + - r-rcpparmadillo + - r-rcppeigen + - r-rcurl + - r-recipes + - r-rematch2 + - r-remotes + - r-reshape2 + - r-reticulate + - r-rex + - r-rgdal + - r-rjava + - r-rlang + - r-rmarkdown + - r-roxygen2 + - r-rpart + - r-rprojroot + - r-rstudioapi + - r-rversions + - r-sampling + - r-scales + - r-sessioninfo + - r-shape + - r-signal + - r-sm + - r-sp + - r-spam + - r-spatstat + - r-spatstat.core + - r-spatstat.data + - r-spatstat.geom + - r-spatstat.linnet + - r-spatstat.sparse + - r-spatstat.utils + - r-specsverification + - r-spei + - r-splancs + - r-squarem + - r-sticky + - r-stringi + - r-stringr + - r-survival + - r-sys + - r-teachingdemos + - r-tensor + - r-tensorflow + - r-testthat + - r-tfruns + - r-tibble + - r-tidyr + - r-tidyselect + - r-timedate + - r-tinytex + - r-tree + - r-udunits2 + - r-usethis + - r-utf8 + - r-vctrs + - r-verification + - r-vioplot + - r-viridis + - r-viridislite + - r-waldo + - r-whisker + - r-withr + - r-xfun + - r-xml2 + - r-xopen + - r-yaml + - r-zeallot + - r-zip + - r-zoo run: - - nbgitpuller - - r-base=3.6 - - r-caret=6.0 - - r-dismo=1.3 - - r-spatstat=1.64 - - r-padr=0.5 - - r-presenceabsence=1.1 - - r-deepnet=0.2 - - r-splancs=2.01 - - r-gtools=3.8 - - r-spei=1.7 - - r-tree=1.0 - - r-rmarkdown=2.8 - - r-devtools=2.4 - - r-spatstat.linnet=1.65 - - r-sampling=2.9 - - r-geosphere=1.5 - - r-randomforest=4.6 - - r-keras=2.4 - - r-rcurl=1.98 - - r-e1071=1.7 - - r-mapplots=1.5 - - r-vioplot=0.3 - - r-akima=0.6 - - r-ncdf4=1.17 - - r-glmnet=4.1 - - r-latticeextra=0.6 - - r-rjava=1.0 - - r-sticky=0.5 - - r-verification=1.42 - - r-udunits2=0.13 - - r-easyverification=0.4 - - r-kohonen=3.0 - - r-ranger=0.12 - - r-climdex.pcic=1.1 - - r-gdalutils=2.0 - - r-evd=2.3 - - r-signal=0.7 - - r-earth=5.3 + - numpy + - pandas + - dask + - iris + + - r-abind + - r-akima + - r-askpass + - r-assertthat + - r-backports + - r-base>=3.6 + - r-base64enc + - r-bitops + - r-boot + - r-brew + - r-brio + - r-cachem + - r-callr + - r-caret + - r-circstats + - r-class + - r-cli + - r-climdex.pcic + - r-clipr + - r-codetools + - r-colorspace + - r-commonmark + - r-config + - r-covr + - r-crayon + - r-credentials + - r-crosstalk + - r-curl + - r-data.table + - r-deepnet + - r-deldir + - r-desc + - r-devtools + - r-diffobj + - r-digest + - r-dismo + - r-dotcall64 + - r-dplyr + - r-dt + - r-dtw + - r-e1071 + - r-earth + - r-easyverification + - r-ellipsis + - r-evaluate + - r-evd + - r-fansi + - r-farver + - r-fastmap + - r-fields + - r-foreach + - r-formula + - r-fs + - r-gdalutils + - r-generics + - r-geosphere + - r-gert + - r-ggplot2 + - r-gh + - r-git2r + - r-gitcreds + - r-glmnet + - r-glue + - r-goftest + - r-gower + - r-gridextra + - r-gtable + - r-gtools + - r-highr + - r-htmltools + - r-htmlwidgets + - r-httr + - r-ini + - r-ipred + - r-isoband + - r-iterators + - r-jpeg + - r-jsonlite + - r-keras + - r-kernsmooth + - r-knitr + - r-kohonen + - r-labeling + - r-later + - r-lattice + - r-latticeextra + - r-lava + - r-lazyeval + - r-lifecycle + - r-lmomco + - r-lmoments + - r-lpsolve + - r-lubridate + - r-magrittr + - r-mapplots + - r-maps + - r-markdown + - r-mass + - r-matrix + - r-memoise + - r-mgcv + - r-mime + - r-modelmetrics + - r-munsell + - r-ncdf4 + - r-nlme + - r-nnet + - r-numderiv + - r-openssl + - r-padr + - r-pbapply + - r-pcict + - r-pillar + - r-pkgbuild + - r-pkgconfig + - r-pkgload + - r-plotmo + - r-plotrix + - r-plyr + - r-png + - r-polyclip + - r-praise + - r-presenceabsence + - r-prettyunits + - r-proc + - r-processx + - r-prodlim + - r-promises + - r-proxy + - r-ps + - r-purrr + - r-r.methodss3 + - r-r.oo + - r-r.utils + - r-r6 + - r-randomforest + - r-ranger + - r-rappdirs + - r-raster + - r-rcmdcheck + - r-rcolorbrewer + - r-rcpp + - r-rcpparmadillo + - r-rcppeigen + - r-rcurl + - r-recipes + - r-rematch2 + - r-remotes + - r-reshape2 + - r-reticulate + - r-rex + - r-rgdal + - r-rjava + - r-rlang + - r-rmarkdown + - r-roxygen2 + - r-rpart + - r-rprojroot + - r-rstudioapi + - r-rversions + - r-sampling + - r-scales + - r-sessioninfo + - r-shape + - r-signal + - r-sm + - r-sp + - r-spam + - r-spatstat + - r-spatstat.core + - r-spatstat.data + - r-spatstat.geom + - r-spatstat.linnet + - r-spatstat.sparse + - r-spatstat.utils + - r-specsverification + - r-spei + - r-splancs + - r-squarem + - r-sticky + - r-stringi + - r-stringr + - r-survival + - r-sys + - r-teachingdemos + - r-tensor + - r-tensorflow + - r-testthat + - r-tfruns + - r-tibble + - r-tidyr + - r-tidyselect + - r-timedate + - r-tinytex + - r-tree + - r-udunits2 + - r-usethis + - r-utf8 + - r-vctrs + - r-verification + - r-vioplot + - r-viridis + - r-viridislite + - r-waldo + - r-whisker + - r-withr + - r-xfun + - r-xml2 + - r-xopen + - r-yaml + - r-zeallot + - r-zip + - r-zoo about: home: https://github.com/SantanderMetGroup/climate4R From c65bdd141d644e9e89b292079f727392e24bb999 Mon Sep 17 00:00:00 2001 From: Jesus Fernandez Date: Tue, 29 Jun 2021 16:41:37 +0200 Subject: [PATCH 08/21] Change channel order in conda install command Setting conda-forge as primary channel avoids conflicts with the default channel --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 19f47a2..e01b4ca 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ conda activate climate4R In this environment, install `climate4R` by issuing: ```bash -conda install -c defaults -c r -c conda-forge -c santandermetgroup climate4r +conda install -c conda-forge -c r -c defaults -c santandermetgroup climate4r ``` Activate the conda environment to work with climate4R. Deactivate the environment with: @@ -85,7 +85,7 @@ Individual packages can be installed directly from the github sources. "SantanderMetGroup/downscaleR")) ``` -### NOTE: installation of specific package versions +#### NOTE: installation of specific package versions In case a particular paper notebook is to be replicated, the installation of specific version tags can be done by just explicitly indicating the tag number in the repo name. For example: From 55e3a0856bc03bee570156a7c1badd4782e83670 Mon Sep 17 00:00:00 2001 From: zequihg50 Date: Thu, 1 Jul 2021 14:59:43 +0200 Subject: [PATCH 09/21] reduced meta.yml dependencies --- conda-full/meta.yaml | 465 +++++-------------------------------------- 1 file changed, 55 insertions(+), 410 deletions(-) diff --git a/conda-full/meta.yaml b/conda-full/meta.yaml index e05d452..0fcbb25 100644 --- a/conda-full/meta.yaml +++ b/conda-full/meta.yaml @@ -7,443 +7,88 @@ source: requirements: build: - - numpy - - pandas - - dask - iris - - r-abind - - r-akima - - r-askpass - - r-assertthat - - r-backports - r-base>=3.6 - - r-base64enc - - r-bitops - - r-boot - - r-brew - - r-brio - - r-cachem - - r-callr - r-caret - - r-circstats - - r-class - - r-cli - - r-climdex.pcic - - r-clipr - - r-codetools - - r-colorspace - - r-commonmark - - r-config - - r-covr - - r-crayon - - r-credentials - - r-crosstalk - - r-curl - - r-data.table + - r-dismo + - r-padr + - r-presenceabsence - r-deepnet - - r-deldir - - r-desc + - r-splancs + - r-gtools + - r-spei + - r-tree + - r-rmarkdown - r-devtools - - r-diffobj - - r-digest - - r-dismo - - r-dotcall64 - - r-dplyr - - r-dt - - r-dtw - - r-e1071 - - r-earth - - r-easyverification - - r-ellipsis - - r-evaluate - - r-evd - - r-fansi - - r-farver - - r-fastmap - - r-fields - - r-foreach - - r-formula - - r-fs - - r-gdalutils - - r-generics + - r-sampling - r-geosphere - - r-gert - - r-ggplot2 - - r-gh - - r-git2r - - r-gitcreds - - r-glmnet - - r-glue - - r-goftest - - r-gower - - r-gridextra - - r-gtable - - r-gtools - - r-highr - - r-htmltools - - r-htmlwidgets - - r-httr - - r-ini - - r-ipred - - r-isoband - - r-iterators - - r-jpeg - - r-jsonlite + - r-randomforest - r-keras - - r-kernsmooth - - r-knitr - - r-kohonen - - r-labeling - - r-later - - r-lattice - - r-latticeextra - - r-lava - - r-lazyeval - - r-lifecycle - - r-lmomco - - r-lmoments - - r-lpsolve - - r-lubridate - - r-magrittr + - r-rcurl + - r-e1071 - r-mapplots - - r-maps - - r-markdown - - r-mass - - r-matrix - - r-memoise - - r-mgcv - - r-mime - - r-modelmetrics - - r-munsell + - r-vioplot + - r-akima - r-ncdf4 - - r-nlme - - r-nnet - - r-numderiv - - r-openssl - - r-padr - - r-pbapply - - r-pcict - - r-pillar - - r-pkgbuild - - r-pkgconfig - - r-pkgload - - r-plotmo - - r-plotrix - - r-plyr - - r-png - - r-polyclip - - r-praise - - r-presenceabsence - - r-prettyunits - - r-proc - - r-processx - - r-prodlim - - r-promises - - r-proxy - - r-ps - - r-purrr - - r-r.methodss3 - - r-r.oo - - r-r.utils - - r-r6 - - r-randomforest - - r-ranger - - r-rappdirs - - r-raster - - r-rcmdcheck - - r-rcolorbrewer - - r-rcpp - - r-rcpparmadillo - - r-rcppeigen - - r-rcurl - - r-recipes - - r-rematch2 - - r-remotes - - r-reshape2 - - r-reticulate - - r-rex - - r-rgdal + - r-glmnet + - r-latticeextra - r-rjava - - r-rlang - - r-rmarkdown - - r-roxygen2 - - r-rpart - - r-rprojroot - - r-rstudioapi - - r-rversions - - r-sampling - - r-scales - - r-sessioninfo - - r-shape - - r-signal - - r-sm - - r-sp - - r-spam - - r-spatstat - - r-spatstat.core - - r-spatstat.data - - r-spatstat.geom - - r-spatstat.linnet - - r-spatstat.sparse - - r-spatstat.utils - - r-specsverification - - r-spei - - r-splancs - - r-squarem - r-sticky - - r-stringi - - r-stringr - - r-survival - - r-sys - - r-teachingdemos - - r-tensor - - r-tensorflow - - r-testthat - - r-tfruns - - r-tibble - - r-tidyr - - r-tidyselect - - r-timedate - - r-tinytex - - r-tree - - r-udunits2 - - r-usethis - - r-utf8 - - r-vctrs - r-verification - - r-vioplot - - r-viridis - - r-viridislite - - r-waldo - - r-whisker - - r-withr - - r-xfun - - r-xml2 - - r-xopen - - r-yaml - - r-zeallot - - r-zip - - r-zoo + - r-udunits2 + - r-easyverification + - r-kohonen + - r-ranger + - r-climdex.pcic + - r-gdalutils + - r-evd + - r-signal + - r-earth + - "r-spatstat<2" + - "r-spatstat.linnet<2" + run: - - numpy - - pandas - - dask - iris - - r-abind - - r-akima - - r-askpass - - r-assertthat - - r-backports - r-base>=3.6 - - r-base64enc - - r-bitops - - r-boot - - r-brew - - r-brio - - r-cachem - - r-callr - r-caret - - r-circstats - - r-class - - r-cli - - r-climdex.pcic - - r-clipr - - r-codetools - - r-colorspace - - r-commonmark - - r-config - - r-covr - - r-crayon - - r-credentials - - r-crosstalk - - r-curl - - r-data.table + - r-dismo + - r-padr + - r-presenceabsence - r-deepnet - - r-deldir - - r-desc + - r-splancs + - r-gtools + - r-spei + - r-tree + - r-rmarkdown - r-devtools - - r-diffobj - - r-digest - - r-dismo - - r-dotcall64 - - r-dplyr - - r-dt - - r-dtw - - r-e1071 - - r-earth - - r-easyverification - - r-ellipsis - - r-evaluate - - r-evd - - r-fansi - - r-farver - - r-fastmap - - r-fields - - r-foreach - - r-formula - - r-fs - - r-gdalutils - - r-generics + - r-sampling - r-geosphere - - r-gert - - r-ggplot2 - - r-gh - - r-git2r - - r-gitcreds - - r-glmnet - - r-glue - - r-goftest - - r-gower - - r-gridextra - - r-gtable - - r-gtools - - r-highr - - r-htmltools - - r-htmlwidgets - - r-httr - - r-ini - - r-ipred - - r-isoband - - r-iterators - - r-jpeg - - r-jsonlite + - r-randomforest - r-keras - - r-kernsmooth - - r-knitr - - r-kohonen - - r-labeling - - r-later - - r-lattice - - r-latticeextra - - r-lava - - r-lazyeval - - r-lifecycle - - r-lmomco - - r-lmoments - - r-lpsolve - - r-lubridate - - r-magrittr + - r-rcurl + - r-e1071 - r-mapplots - - r-maps - - r-markdown - - r-mass - - r-matrix - - r-memoise - - r-mgcv - - r-mime - - r-modelmetrics - - r-munsell + - r-vioplot + - r-akima - r-ncdf4 - - r-nlme - - r-nnet - - r-numderiv - - r-openssl - - r-padr - - r-pbapply - - r-pcict - - r-pillar - - r-pkgbuild - - r-pkgconfig - - r-pkgload - - r-plotmo - - r-plotrix - - r-plyr - - r-png - - r-polyclip - - r-praise - - r-presenceabsence - - r-prettyunits - - r-proc - - r-processx - - r-prodlim - - r-promises - - r-proxy - - r-ps - - r-purrr - - r-r.methodss3 - - r-r.oo - - r-r.utils - - r-r6 - - r-randomforest - - r-ranger - - r-rappdirs - - r-raster - - r-rcmdcheck - - r-rcolorbrewer - - r-rcpp - - r-rcpparmadillo - - r-rcppeigen - - r-rcurl - - r-recipes - - r-rematch2 - - r-remotes - - r-reshape2 - - r-reticulate - - r-rex - - r-rgdal + - r-glmnet + - r-latticeextra - r-rjava - - r-rlang - - r-rmarkdown - - r-roxygen2 - - r-rpart - - r-rprojroot - - r-rstudioapi - - r-rversions - - r-sampling - - r-scales - - r-sessioninfo - - r-shape - - r-signal - - r-sm - - r-sp - - r-spam - - r-spatstat - - r-spatstat.core - - r-spatstat.data - - r-spatstat.geom - - r-spatstat.linnet - - r-spatstat.sparse - - r-spatstat.utils - - r-specsverification - - r-spei - - r-splancs - - r-squarem - r-sticky - - r-stringi - - r-stringr - - r-survival - - r-sys - - r-teachingdemos - - r-tensor - - r-tensorflow - - r-testthat - - r-tfruns - - r-tibble - - r-tidyr - - r-tidyselect - - r-timedate - - r-tinytex - - r-tree - - r-udunits2 - - r-usethis - - r-utf8 - - r-vctrs - r-verification - - r-vioplot - - r-viridis - - r-viridislite - - r-waldo - - r-whisker - - r-withr - - r-xfun - - r-xml2 - - r-xopen - - r-yaml - - r-zeallot - - r-zip - - r-zoo + - r-udunits2 + - r-easyverification + - r-kohonen + - r-ranger + - r-climdex.pcic + - r-gdalutils + - r-evd + - r-signal + - r-earth + - "r-spatstat<2" + - "r-spatstat.linnet<2" about: home: https://github.com/SantanderMetGroup/climate4R From 2071ad6f4720a9f2aab4bc3f8f04e71d9eb0804b Mon Sep 17 00:00:00 2001 From: Joaquin Bedia Date: Fri, 2 Jul 2021 11:36:12 +0200 Subject: [PATCH 10/21] Update README.md Include additional aid for jupyter notebook installation in new climate4r dedicated environments --- conda-full/README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/conda-full/README.md b/conda-full/README.md index 12ff3fe..169b081 100644 --- a/conda-full/README.md +++ b/conda-full/README.md @@ -4,6 +4,17 @@ conda install -c santandermetgroup -c conda-forge -c r -c defaults climate4r=1.5.0 ``` +*** +_Note for jupyter notebook users_: From a dedicated environment, to run notebooks using climate4R include it as: + +``` +conda install -c santandermetgroup -c conda-forge -c r -c defaults climate4r=1.5.0 jupyter +``` + +in order to include jupyter notebooks in your newly created environment + +*** + ## Build (only for the admin) Use mambabuild, see below. From a0a092abe420389bb9afd90fba0be0f5418920d8 Mon Sep 17 00:00:00 2001 From: Joaquin Bedia Date: Fri, 2 Jul 2021 12:56:13 +0200 Subject: [PATCH 11/21] Update README.md --- conda-full/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conda-full/README.md b/conda-full/README.md index 169b081..68f7724 100644 --- a/conda-full/README.md +++ b/conda-full/README.md @@ -8,7 +8,7 @@ conda install -c santandermetgroup -c conda-forge -c r -c defaults climate4r=1.5 _Note for jupyter notebook users_: From a dedicated environment, to run notebooks using climate4R include it as: ``` -conda install -c santandermetgroup -c conda-forge -c r -c defaults climate4r=1.5.0 jupyter +conda install -c santandermetgroup -c conda-forge -c r -c defaults climate4r=1.5.0 jupyter r-irkernel ``` in order to include jupyter notebooks in your newly created environment From bd06d00ba59a0e8b679f131f97eb6722793407e1 Mon Sep 17 00:00:00 2001 From: zequihg50 Date: Tue, 6 Jul 2021 17:28:20 +0200 Subject: [PATCH 12/21] Generated Dockerfile for 1.5.0 --- Dockerfile | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9c8823b..1c2c33f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,13 @@ -FROM santandermetgroup/climate4r:1.4.1 +FROM jupyter/base-notebook:latest -COPY --chown=jovyan:users notebooks /home/$NB_USER/notebooks +USER root +RUN apt-get update && apt-get install -y xorg git + +USER $NB_USER +RUN conda install mamba -y -n base -c conda-forge && \ + mamba install -y -c santandermetgroup -c conda-forge -c r -c defaults \ + climate4r=1.5.0 \ + xarray pandas matplotlib cartopy netcdf4 cftime dask iris \ + jupyter_contrib_nbextensions jupyter_nbextensions_configurator r-irkernel && \ + chown -R jovyan:users /home/jovyan && \ + R --vanilla -e 'IRkernel::installspec()' From e1d354bc788b8ca5246405155afbb5a12955890b Mon Sep 17 00:00:00 2001 From: zequihg50 Date: Thu, 8 Jul 2021 19:08:28 +0200 Subject: [PATCH 13/21] updated conda to 1.5.1 --- conda-full/README.md | 3 ++- conda-full/build.sh | 4 ++++ conda-full/install.R | 18 +++++++++--------- conda-full/meta.yaml | 2 +- 4 files changed, 16 insertions(+), 11 deletions(-) diff --git a/conda-full/README.md b/conda-full/README.md index 68f7724..b46ecc1 100644 --- a/conda-full/README.md +++ b/conda-full/README.md @@ -38,5 +38,6 @@ conda install mamba -n base -c conda-forge Build: ```bash -conda mambabuild -c conda-forge -c r -c defaults . +rm -rf ${HOME}/miniconda3/conda-bld/src_cache +conda mambabuild -c conda-forge -c r -c defaults . &>log & ``` diff --git a/conda-full/build.sh b/conda-full/build.sh index b1a81fa..6784f7f 100644 --- a/conda-full/build.sh +++ b/conda-full/build.sh @@ -1 +1,5 @@ +#!/bin/bash + +set -e + Rscript install.R diff --git a/conda-full/install.R b/conda-full/install.R index 955fa64..9dc229b 100644 --- a/conda-full/install.R +++ b/conda-full/install.R @@ -1,21 +1,21 @@ package.version <- list( - climate4R.UDG = "0.2.0", + climate4R.UDG = "0.2.3", loadeR.java = "1.1.1", - loadeR = "1.7.0", + loadeR = "1.7.1", loadeR.ECOMS = "1.4.6", - transformeR = "2.1.0", - downscaleR = "3.3.2", + transformeR = "2.1.2", + downscaleR = "3.3.3", downscaleR.keras = "1.0.0", - visualizeR = "1.6.0", + visualizeR = "1.6.1", convertR = "0.2.0", geoprocessoR = "0.2.0", - climate4R.climdex = "0.2.1", - climate4R.indices = "0.1.0", - loadeR.2nc = "0.1.1", + climate4R.climdex = "0.2.2", + climate4R.indices = "0.2.0", + loadeR.2nc = "0.1.2", fireDanger = "1.1.0", VALUE = "2.2.1", climate4R.value = "0.0.2", - mopa = "1.0.0", + mopa = "1.0.2", drought4R = "0.2.0", climate4R.datasets = "0.0.1" ) diff --git a/conda-full/meta.yaml b/conda-full/meta.yaml index 0fcbb25..cf4eb43 100644 --- a/conda-full/meta.yaml +++ b/conda-full/meta.yaml @@ -1,6 +1,6 @@ package: name: climate4r - version: 1.5.0 + version: 1.5.1 source: url: file://{{ RECIPE_DIR }}/install.R From f64ffebdfdd7607d39730cd8dc6f36c9e949ac0a Mon Sep 17 00:00:00 2001 From: zequihg50 Date: Fri, 9 Jul 2021 10:22:44 +0200 Subject: [PATCH 14/21] Updated README --- conda-full/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conda-full/README.md b/conda-full/README.md index b46ecc1..89e102d 100644 --- a/conda-full/README.md +++ b/conda-full/README.md @@ -1,14 +1,14 @@ # conda recipe for climate4R ```bash -conda install -c santandermetgroup -c conda-forge -c r -c defaults climate4r=1.5.0 +conda install -c santandermetgroup -c conda-forge -c r -c defaults climate4r=1.5.1 ``` *** _Note for jupyter notebook users_: From a dedicated environment, to run notebooks using climate4R include it as: ``` -conda install -c santandermetgroup -c conda-forge -c r -c defaults climate4r=1.5.0 jupyter r-irkernel +conda install -c santandermetgroup -c conda-forge -c r -c defaults climate4r=1.5.1 jupyter r-irkernel ``` in order to include jupyter notebooks in your newly created environment From 68dfc4ff7592e5d01c3003ac3a19f189b5a8b4fa Mon Sep 17 00:00:00 2001 From: zequihg50 Date: Tue, 20 Jul 2021 10:32:27 +0200 Subject: [PATCH 15/21] using r- packages instead of install.R --- conda-base/README.md | 26 --------- conda-base/build.sh | 18 ------- conda-base/get-last-release.sh | 52 ------------------ conda-base/meta.yaml | 29 ---------- conda-full/meta.yaml | 94 --------------------------------- {conda-full => conda}/README.md | 6 +-- {conda-full => conda}/build.sh | 2 +- {conda-full => conda}/install.R | 0 conda/meta.yaml | 58 ++++++++++++++++++++ 9 files changed, 62 insertions(+), 223 deletions(-) delete mode 100644 conda-base/README.md delete mode 100644 conda-base/build.sh delete mode 100755 conda-base/get-last-release.sh delete mode 100644 conda-base/meta.yaml delete mode 100644 conda-full/meta.yaml rename {conda-full => conda}/README.md (85%) rename {conda-full => conda}/build.sh (52%) rename {conda-full => conda}/install.R (100%) create mode 100644 conda/meta.yaml diff --git a/conda-base/README.md b/conda-base/README.md deleted file mode 100644 index 41af9a9..0000000 --- a/conda-base/README.md +++ /dev/null @@ -1,26 +0,0 @@ -## conda recipe for the climate4R core packages - -To install the whole framework go to [conda-full](https://github.com/SantanderMetGroup/climate4R/tree/devel/conda-full) - -```bash -# create a conda environment -conda create --name nameofmycondaenvironment -# activate the environment -conda activate nameofmycondaenvironment -# install climate4R -conda install -c defaults -c r -c conda-forge -c santandermetgroup climate4r-base=1.0.1 -``` -Activate the conda environment to work with climate4R. To deactivate the environment run the following: - -```bash -# deactivate the environment -conda deactivate -``` - -### Build (only for the admin) - -```bash -conda build -c defaults -c r -c conda-forge . -anaconda login -anaconda upload -u SantanderMetGroup TAR_BZ2 -``` diff --git a/conda-base/build.sh b/conda-base/build.sh deleted file mode 100644 index ed20fdd..0000000 --- a/conda-base/build.sh +++ /dev/null @@ -1,18 +0,0 @@ -# for convertR -export UDUNITS2_LIB=${PREFIX}/lib -export UDUNITS2_INCLUDE=${PREFIX}/include -export CPATH=${PREFIX}/include - -# for rjava -export LD_LIBRARY_PATH=${PREFIX}/lib:${PREFIX}/lib/server:$PREFIX/lib/R/library/rJava/libs:$PREFIX/jre/lib/amd64/server - -R --vanilla -e 'install.packages("devtools", repos="https://cloud.r-project.org/")' -R --vanilla -e "install.packages('udunits2', repos='https://cloud.r-project.org/', configure.args='--with-udunits2-lib=${UDUNITS2_LIB}')" -R --vanilla -e 'install.packages("ncdf4", repos="https://cloud.r-project.org/")' -R --vanilla -e 'library(devtools);install_github("SantanderMetGroup/loadeR.java@v1.1.1")' -R --vanilla -e 'library(devtools);install_github("SantanderMetGroup/climate4R.UDG@devel")' -R --vanilla -e 'library(devtools);install_github("SantanderMetGroup/loadeR@devel")' -R --vanilla -e 'library(devtools);install_github("SantanderMetGroup/loadeR.2nc@v0.1.1")' -R --vanilla -e 'library(devtools);install_github("SantanderMetGroup/transformeR@v2.0.1")' -R --vanilla -e 'library(devtools);install_github("SantanderMetGroup/downscaleR@v3.3.1")' -R --vanilla -e 'library(devtools);install_github("SantanderMetGroup/visualizeR@v1.6.0")' diff --git a/conda-base/get-last-release.sh b/conda-base/get-last-release.sh deleted file mode 100755 index e118456..0000000 --- a/conda-base/get-last-release.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/bash - -set -u - -trap exit SIGINT - -repos=' -SantanderMetGroup/climate4R.UDG -SantanderMetGroup/loadeR.java -SantanderMetGroup/loadeR -SantanderMetGroup/loadeR.ECOMS -SantanderMetGroup/transformeR -SantanderMetGroup/downscaleR.keras -SantanderMetGroup/downscaleR -SantanderMetGroup/visualizeR -SantanderMetGroup/convertR -SantanderMetGroup/geoprocessoR -SantanderMetGroup/climate4R.climdex -SantanderMetGroup/climate4R.indices -SantanderMetGroup/loadeR.2nc -SantanderMetGroup/fireDanger -SantanderMetGroup/VALUE -SantanderMetGroup/climate4R.value -SantanderMetGroup/mopa -SantanderMetGroup/drought4R -SantanderMetGroup/climate4R.datasets' - -cat >build.sh <> build.sh -done diff --git a/conda-base/meta.yaml b/conda-base/meta.yaml deleted file mode 100644 index fda4539..0000000 --- a/conda-base/meta.yaml +++ /dev/null @@ -1,29 +0,0 @@ -package: - name: climate4r-base - version: 1.0.1 - -build: - script_env: - - GITHUB_PAT - rpaths: - - lib/R/lib/ - - lib/ - -requirements: - build: - - r-base=3.6.1 - - r-rjava - - openjdk - - curl - - udunits2 - - netcdf4 - run: - - r-base=3.6.1 - - r-rjava - - openjdk - - curl - - udunits2 - - netcdf4 - -about: - home: https://github.com/SantanderMetGroup/climate4R diff --git a/conda-full/meta.yaml b/conda-full/meta.yaml deleted file mode 100644 index cf4eb43..0000000 --- a/conda-full/meta.yaml +++ /dev/null @@ -1,94 +0,0 @@ -package: - name: climate4r - version: 1.5.1 - -source: - url: file://{{ RECIPE_DIR }}/install.R - -requirements: - build: - - iris - - - r-base>=3.6 - - r-caret - - r-dismo - - r-padr - - r-presenceabsence - - r-deepnet - - r-splancs - - r-gtools - - r-spei - - r-tree - - r-rmarkdown - - r-devtools - - r-sampling - - r-geosphere - - r-randomforest - - r-keras - - r-rcurl - - r-e1071 - - r-mapplots - - r-vioplot - - r-akima - - r-ncdf4 - - r-glmnet - - r-latticeextra - - r-rjava - - r-sticky - - r-verification - - r-udunits2 - - r-easyverification - - r-kohonen - - r-ranger - - r-climdex.pcic - - r-gdalutils - - r-evd - - r-signal - - r-earth - - "r-spatstat<2" - - "r-spatstat.linnet<2" - - run: - - iris - - - r-base>=3.6 - - r-caret - - r-dismo - - r-padr - - r-presenceabsence - - r-deepnet - - r-splancs - - r-gtools - - r-spei - - r-tree - - r-rmarkdown - - r-devtools - - r-sampling - - r-geosphere - - r-randomforest - - r-keras - - r-rcurl - - r-e1071 - - r-mapplots - - r-vioplot - - r-akima - - r-ncdf4 - - r-glmnet - - r-latticeextra - - r-rjava - - r-sticky - - r-verification - - r-udunits2 - - r-easyverification - - r-kohonen - - r-ranger - - r-climdex.pcic - - r-gdalutils - - r-evd - - r-signal - - r-earth - - "r-spatstat<2" - - "r-spatstat.linnet<2" - -about: - home: https://github.com/SantanderMetGroup/climate4R diff --git a/conda-full/README.md b/conda/README.md similarity index 85% rename from conda-full/README.md rename to conda/README.md index 89e102d..e0b6ae2 100644 --- a/conda-full/README.md +++ b/conda/README.md @@ -1,14 +1,14 @@ # conda recipe for climate4R ```bash -conda install -c santandermetgroup -c conda-forge -c r -c defaults climate4r=1.5.1 +conda install -c santandermetgroup -c conda-forge -c r -c defaults climate4r=1.5.2 ``` *** _Note for jupyter notebook users_: From a dedicated environment, to run notebooks using climate4R include it as: ``` -conda install -c santandermetgroup -c conda-forge -c r -c defaults climate4r=1.5.1 jupyter r-irkernel +conda install -c santandermetgroup -c conda-forge -c r -c defaults climate4r=1.5.2 jupyter r-irkernel ``` in order to include jupyter notebooks in your newly created environment @@ -39,5 +39,5 @@ Build: ```bash rm -rf ${HOME}/miniconda3/conda-bld/src_cache -conda mambabuild -c conda-forge -c r -c defaults . &>log & +conda mambabuild -c santandermetgroup -c conda-forge -c r -c defaults . &>log & ``` diff --git a/conda-full/build.sh b/conda/build.sh similarity index 52% rename from conda-full/build.sh rename to conda/build.sh index 6784f7f..ac0fd82 100644 --- a/conda-full/build.sh +++ b/conda/build.sh @@ -2,4 +2,4 @@ set -e -Rscript install.R +#Rscript install.R diff --git a/conda-full/install.R b/conda/install.R similarity index 100% rename from conda-full/install.R rename to conda/install.R diff --git a/conda/meta.yaml b/conda/meta.yaml new file mode 100644 index 0000000..447283a --- /dev/null +++ b/conda/meta.yaml @@ -0,0 +1,58 @@ +package: + name: climate4r + version: 1.5.2 + +source: + url: file://{{ RECIPE_DIR }}/install.R + +requirements: + build: + - iris + + - r-base>=3.6 + - r-climate4r.udg + - r-loader.java + - r-loader + - r-loader.ecoms + - r-transformer + - r-downscaler + - r-downscaler.keras + - r-visualizer + - r-convertr + - r-geoprocessor + - r-climate4r.climdex + - r-climate4r.indices + - r-loader.2nc + - r-firedanger + - r-value + - r-climate4r.value + - r-mopa + - r-drought4r + - r-climate4r.datasets + + run: + - iris + + - r-base>=3.6 + - r-climate4r.udg + - r-loader.java + - r-loader + - r-loader.ecoms + - r-transformer + - r-downscaler + - r-downscaler.keras + - r-visualizer + - r-convertr + - r-geoprocessor + - r-climate4r.climdex + - r-climate4r.indices + - r-loader.2nc + - r-firedanger + - r-value + - r-climate4r.value + - r-mopa + - r-drought4r + - r-climate4r.datasets + +about: + home: https://github.com/SantanderMetGroup/climate4R From ff84c638dd8d70b590213bf2fb583f5ba2d07da6 Mon Sep 17 00:00:00 2001 From: "Antonio S. Cofino" Date: Fri, 6 Aug 2021 16:23:19 +0200 Subject: [PATCH 16/21] The first release based only on conda packages --- conda/README.md | 22 ++++++------ conda/build.sh | 5 --- conda/install.R | 28 --------------- conda/meta.yaml | 92 +++++++++++++++++++++---------------------------- 4 files changed, 50 insertions(+), 97 deletions(-) delete mode 100644 conda/build.sh delete mode 100644 conda/install.R diff --git a/conda/README.md b/conda/README.md index e0b6ae2..09a6cf3 100644 --- a/conda/README.md +++ b/conda/README.md @@ -1,28 +1,28 @@ -# conda recipe for climate4R +# Conda recipe for climate4R metapackage + +## Installing climate4R conda metapackage ```bash -conda install -c santandermetgroup -c conda-forge -c r -c defaults climate4r=1.5.2 +conda install -c conda-forge -c r -c defaults -c santandermetgroup r-climate4r ``` *** _Note for jupyter notebook users_: From a dedicated environment, to run notebooks using climate4R include it as: -``` -conda install -c santandermetgroup -c conda-forge -c r -c defaults climate4r=1.5.2 jupyter r-irkernel +```bash +conda install -c conda-forge -c r -c defaults -c santandermetgroup r-climate4r + jupyter r-irkernel ``` in order to include jupyter notebooks in your newly created environment - *** -## Build (only for the admin) - -Use mambabuild, see below. +## Building climate4R conda metapackage ```bash -conda build -c conda-forge -c r -c defaults . +conda build -c conda-forge -c r -c defaults -c santandermetgroup . anaconda login -anaconda upload -u SantanderMetGroup TAR_BZ2 +anaconda upload -u SantanderMetGroup PATH_TO_TAR_BZ2 ``` ## ToDo, explore mamba and boa @@ -39,5 +39,5 @@ Build: ```bash rm -rf ${HOME}/miniconda3/conda-bld/src_cache -conda mambabuild -c santandermetgroup -c conda-forge -c r -c defaults . &>log & +conda mambabuild -c conda-forge -c r -c defaults -c santandermetgroup . &>log & ``` diff --git a/conda/build.sh b/conda/build.sh deleted file mode 100644 index ac0fd82..0000000 --- a/conda/build.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -set -e - -#Rscript install.R diff --git a/conda/install.R b/conda/install.R deleted file mode 100644 index 9dc229b..0000000 --- a/conda/install.R +++ /dev/null @@ -1,28 +0,0 @@ -package.version <- list( - climate4R.UDG = "0.2.3", - loadeR.java = "1.1.1", - loadeR = "1.7.1", - loadeR.ECOMS = "1.4.6", - transformeR = "2.1.2", - downscaleR = "3.3.3", - downscaleR.keras = "1.0.0", - visualizeR = "1.6.1", - convertR = "0.2.0", - geoprocessoR = "0.2.0", - climate4R.climdex = "0.2.2", - climate4R.indices = "0.2.0", - loadeR.2nc = "0.1.2", - fireDanger = "1.1.0", - VALUE = "2.2.1", - climate4R.value = "0.0.2", - mopa = "1.0.2", - drought4R = "0.2.0", - climate4R.datasets = "0.0.1" -) -for (pkg in names(package.version)) { - tarball = sprintf("https://github.com/SantanderMetGroup/%s/archive/refs/tags/v%s.tar.gz", pkg, package.version[[pkg]]) - if(!require(pkg, character.only = TRUE)){ # to avoid download and install already installed packages - install.packages(tarball, repos = NULL) - require(pkg, character.only = TRUE) - } -} diff --git a/conda/meta.yaml b/conda/meta.yaml index 447283a..fdd1bd8 100644 --- a/conda/meta.yaml +++ b/conda/meta.yaml @@ -1,58 +1,44 @@ package: - name: climate4r - version: 1.5.2 - -source: - url: file://{{ RECIPE_DIR }}/install.R - + name: r-climate4r + version: 2.5.3 +build: + number: 0 + noarch: generic requirements: - build: - - iris - - - r-base>=3.6 - - r-climate4r.udg - - r-loader.java - - r-loader - - r-loader.ecoms - - r-transformer - - r-downscaler - - r-downscaler.keras - - r-visualizer - - r-convertr - - r-geoprocessor - - r-climate4r.climdex - - r-climate4r.indices - - r-loader.2nc - - r-firedanger - - r-value - - r-climate4r.value - - r-mopa - - r-drought4r - - r-climate4r.datasets - + build: [] run: - - iris - - - r-base>=3.6 - - r-climate4r.udg - - r-loader.java - - r-loader - - r-loader.ecoms - - r-transformer - - r-downscaler - - r-downscaler.keras - - r-visualizer - - r-convertr - - r-geoprocessor - - r-climate4r.climdex - - r-climate4r.indices - - r-loader.2nc - - r-firedanger - - r-value - - r-climate4r.value - - r-mopa - - r-drought4r - - r-climate4r.datasets + #r dependencies + - r-base ==3.6.3 + - r-climate4r.udg ==0.2.3 + - r-loader.java ==1.1.1 + - r-loader ==1.7.1 + - r-loader.ecoms ==1.4.6 + - r-transformer ==2.1.3 + - r-downscaler ==3.3.3 + - r-downscaler.keras ==1.0.0 + - r-visualizer ==1.6.1 + - r-convertr ==0.2.0 + - r-geoprocessor ==0.2.0 + - r-climate4r.climdex ==0.2.2 + - r-climate4r.indices ==0.2.0 + - r-loader.2nc ==0.1.2 + - r-firedanger ==1.1.0 + - r-value ==2.2.1 + - r-climate4r.value ==0.0.2 + - r-mopa ==1.0.0 + - r-drought4r ==0.2.0 + - r-climate4r.datasets ==0.0.1 + #python dependencies + - python ==3.7.11 + - iris ==3.0.4 about: - home: https://github.com/SantanderMetGroup/climate4R + home: http://www.meteo.unican.es/climate4r + license: GPL-3.0-or-later + summary: Climate4R Framework + license_family: GPL3 + +extra: + recipe-maintainers: + - conda-forge/r + - cofinoa From 907b8322c15481db98504717481ae902ed2c91d9 Mon Sep 17 00:00:00 2001 From: "Antonio S. Cofino" Date: Fri, 6 Aug 2021 18:14:54 +0200 Subject: [PATCH 17/21] Fix build string --- conda/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conda/meta.yaml b/conda/meta.yaml index fdd1bd8..8a8716b 100644 --- a/conda/meta.yaml +++ b/conda/meta.yaml @@ -2,7 +2,7 @@ package: name: r-climate4r version: 2.5.3 build: - number: 0 + string: r36_0 noarch: generic requirements: build: [] From ddfc39763a9b0cc99f4a1d836f7ccfb43a632e8a Mon Sep 17 00:00:00 2001 From: "Antonio S. Cofino" Date: Fri, 6 Aug 2021 19:53:40 +0200 Subject: [PATCH 18/21] Relaxing R and Python version specification --- conda/meta.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/conda/meta.yaml b/conda/meta.yaml index 8a8716b..a41bee8 100644 --- a/conda/meta.yaml +++ b/conda/meta.yaml @@ -2,13 +2,13 @@ package: name: r-climate4r version: 2.5.3 build: - string: r36_0 + string: r36_1 noarch: generic requirements: build: [] run: #r dependencies - - r-base ==3.6.3 + - r-base >=3.6.3,<3.7 - r-climate4r.udg ==0.2.3 - r-loader.java ==1.1.1 - r-loader ==1.7.1 @@ -29,7 +29,7 @@ requirements: - r-drought4r ==0.2.0 - r-climate4r.datasets ==0.0.1 #python dependencies - - python ==3.7.11 + - python >=3.7,<3.8 - iris ==3.0.4 about: From ee9c9c1879394cebbfbf3328111c1cdb021e11d7 Mon Sep 17 00:00:00 2001 From: Jesus Fernandez Date: Sun, 8 Aug 2021 19:13:12 +0200 Subject: [PATCH 19/21] Update README.md --- docker/README.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/docker/README.md b/docker/README.md index 1c5c71a..e21c7bc 100644 --- a/docker/README.md +++ b/docker/README.md @@ -1,7 +1,6 @@ +# Dockerfile -## Dockerfile containing all required software to work with climate4R in jupyter - -This Dockerfile is the basis of the climate4r [Docker](https://www.docker.com/why-docker), where `climate4R` and [jupyter](https://jupyter.readthedocs.io/en/latest) frameworks are already installed. This is the base layer for the **climate4R Hub** (a cloud-based computing facility to run `climate4R` notebooks at [IFCA/CSIC Cloud Services](https://ifca.unican.es/en-us/research/advanced-computing-and-e-science)). +This Dockerfile is the basis of the climate4R [Docker](https://www.docker.com/why-docker), where `climate4R` and [jupyter](https://jupyter.readthedocs.io/en/latest) frameworks are already installed. This is the base layer for the **climate4R Hub** (a cloud-based computing facility to run `climate4R` notebooks at [IFCA (CSIC-UC) Cloud Services](https://ifca.unican.es/en-us/research/advanced-computing-and-e-science)). ## Instructions to start working with the climate4R Docker @@ -17,7 +16,7 @@ $ sudo usermod -aG docker your-user Finally, "logout" and "login" again. -Find more information about docker at [https://medium.freecodecamp.org/a-beginner-friendly-introduction-to-containers-vms-and-docker-79a9e3e119b](https://medium.freecodecamp.org/a-beginner-friendly-introduction-to-containers-vms-and-docker-79a9e3e119b) +Find more information about docker at [this freeCodeCamp entry](https://medium.freecodecamp.org/a-beginner-friendly-introduction-to-containers-vms-and-docker-79a9e3e119b) ### Pull and run the climate4r Docker image @@ -33,7 +32,7 @@ http://(firstchoice or secondchoice):8888/ Write http://firstchoice:8888/ or http://secondchoice:8888/ in your browser and start working with climate4R in jupyter! -### Build (only for the admin) +## Build (only for the admin) ```bash docker build -t santandermetgroup/climate4r:latest -f Dockerfile . From 01546b7c0259dcc4b7cef8a00a872c77e1fb6f71 Mon Sep 17 00:00:00 2001 From: Jesus Fernandez Date: Sun, 8 Aug 2021 19:16:49 +0200 Subject: [PATCH 20/21] Update README.md Switch to new naming (r-climate4r) and remove specific version --- conda/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conda/README.md b/conda/README.md index e0b6ae2..c7b0ddd 100644 --- a/conda/README.md +++ b/conda/README.md @@ -1,14 +1,14 @@ # conda recipe for climate4R ```bash -conda install -c santandermetgroup -c conda-forge -c r -c defaults climate4r=1.5.2 +conda install -c santandermetgroup -c conda-forge -c r -c defaults r-climate4r ``` *** _Note for jupyter notebook users_: From a dedicated environment, to run notebooks using climate4R include it as: ``` -conda install -c santandermetgroup -c conda-forge -c r -c defaults climate4r=1.5.2 jupyter r-irkernel +conda install -c santandermetgroup -c conda-forge -c r -c defaults r-climate4r jupyter r-irkernel ``` in order to include jupyter notebooks in your newly created environment From daf668182046efe92407f79ba7d9315f59606f33 Mon Sep 17 00:00:00 2001 From: "Antonio S. Cofino" Date: Mon, 9 Aug 2021 09:08:50 +0200 Subject: [PATCH 21/21] Preparing release v2.5.3 --- Dockerfile | 4 ++-- docker/Dockerfile | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1c2c33f..86a646b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,8 +5,8 @@ RUN apt-get update && apt-get install -y xorg git USER $NB_USER RUN conda install mamba -y -n base -c conda-forge && \ - mamba install -y -c santandermetgroup -c conda-forge -c r -c defaults \ - climate4r=1.5.0 \ + mamba install -y -c conda-forge -c r -c defaults -c santandermetgroup \ + r-climate4r=2.5.3 \ xarray pandas matplotlib cartopy netcdf4 cftime dask iris \ jupyter_contrib_nbextensions jupyter_nbextensions_configurator r-irkernel && \ chown -R jovyan:users /home/jovyan && \ diff --git a/docker/Dockerfile b/docker/Dockerfile index 5ef806e..21c9f29 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -9,8 +9,8 @@ RUN apt-get update && apt-get install -y xorg git && \ USER $NB_USER RUN conda install mamba -y -n base -c conda-forge && \ - mamba install -y -c santandermetgroup -c conda-forge -c r -c defaults \ - climate4r=1.5.0 \ + mamba install -y -c conda-forge -c r -c defaults -c santandermetgroup \ + r-climate4r=2.5.3 \ xarray pandas matplotlib cartopy netcdf4 cftime dask iris \ jupyter_contrib_nbextensions jupyter_nbextensions_configurator r-irkernel && \ chown -R jovyan:users /home/jovyan && \