From e5df6b8b4753f9c04613287c81d4b12b08931aff Mon Sep 17 00:00:00 2001 From: gaelforget Date: Sun, 26 Jun 2022 18:30:15 -0400 Subject: [PATCH] add R, octave + kernels + compile MITgcm + README --- Dockerfile | 13 ++++++++++++- README.md | 7 ++++++- src/build_MITgcm_ECCO.sh | 16 ++++++++++++++++ 3 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 src/build_MITgcm_ECCO.sh diff --git a/Dockerfile b/Dockerfile index b676edd..0c7e56d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,7 +24,8 @@ ENV JULIA_PROJECT ${USER_HOME_DIR} ENV JULIA_DEPOT_PATH ${USER_HOME_DIR}/.julia RUN conda config --env --add channels conda-forge -RUN conda install numpy xarray dask pandas rise +RUN conda config --env --add channels r +RUN conda install numpy xarray dask pandas rise octave_kernel texinfo r-irkernel RUN julia -e "import Pkg; Pkg.Registry.update(); Pkg.instantiate();" USER root @@ -32,6 +33,8 @@ USER root RUN apt-get update && \ apt-get install -y --no-install-recommends build-essential && \ apt-get install -y --no-install-recommends vim && \ + apt-get install -y --no-install-recommends git && \ + apt-get install -y --no-install-recommends unzip && \ apt-get install -y --no-install-recommends gfortran && \ apt-get install -y --no-install-recommends openmpi-bin && \ apt-get install -y --no-install-recommends openmpi-doc && \ @@ -39,6 +42,11 @@ RUN apt-get update && \ apt-get install -y --no-install-recommends mpich && \ apt-get install -y --no-install-recommends libnetcdf-dev && \ apt-get install -y --no-install-recommends libnetcdff-dev && \ + apt-get install -y --no-install-recommends octave && \ + apt-get install -y --no-install-recommends octave-doc && \ + apt-get install -y --no-install-recommends octave-info && \ + apt-get install -y --no-install-recommends octave-htmldoc && \ + apt-get install -y --no-install-recommends liboctave-dev && \ apt-get clean && rm -rf /var/lib/apt/lists/* USER ${NB_USER} @@ -52,3 +60,6 @@ RUN jupyter labextension install @jupyterlab/server-proxy && \ RUN julia --project=${mainpath} -e "import Pkg; Pkg.instantiate();" RUN julia ${mainpath}/src/download_stuff.jl +ENV MPI_INC_DIR /usr/lib/x86_64-linux-gnu/openmpi/include +RUN source ./src/build_MITgcm_ECCO.sh + diff --git a/README.md b/README.md index 53f5930..6d95e4e 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,10 @@ -This repository is based on the Docker configuration in [JuliaClimate/Notebooks](https://github.com/JuliaClimate/Notebooks). It provides a [Docker image](https://www.docker.com) that makes it easy to analyze and run [NASA / ECCO](https://ecco-group.org) solutions. +This [Docker image](https://www.docker.com) configuration makes it easy to analyze and run [NASA](https://ecco-group.org) ocean state estimates and other [MITgcm](http://mitgcm.org) model solutions. It derives from the [JuliaClimate/Notebooks](https://github.com/JuliaClimate/Notebooks) configuration and includes : + +- [MITgcm](https://mitgcm.readthedocs.io/en/latest/?badge=latest) (67z) compiled for [ECCOv4](https://eccov4.readthedocs.io/en/latest/) (r2) +- gfortran, mpi, and netcdf libraries for MITgcm +- Julia, R, and Python kernels (for Jupyter notebooks) +- Support for Pluto notebook (+ Jupyter + terminal) !!! warning Work in progress... diff --git a/src/build_MITgcm_ECCO.sh b/src/build_MITgcm_ECCO.sh new file mode 100644 index 0000000..29323ae --- /dev/null +++ b/src/build_MITgcm_ECCO.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +git clone --depth 1 --branch checkpoint67z https://github.com/MITgcm/MITgcm +git clone https://github.com/gaelforget/ECCOv4 + +mkdir MITgcm/mysetups +mv ECCOv4 MITgcm/mysetups/. + +#export MPI_INC_DIR=/usr/lib/x86_64-linux-gnu/openmpi/include + +cd MITgcm/mysetups/ECCOv4/build +../../../tools/genmake2 -mods=../code -mpi +make depend +make -j 4 +cd .. +