Skip to content

Commit

Permalink
add R, octave + kernels + compile MITgcm + README
Browse files Browse the repository at this point in the history
  • Loading branch information
gaelforget committed Jun 26, 2022
1 parent 10c2c37 commit e5df6b8
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 2 deletions.
13 changes: 12 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,29 @@ 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

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 && \
apt-get install -y --no-install-recommends libopenmpi-dev && \
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}
Expand All @@ -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

7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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...
Expand Down
16 changes: 16 additions & 0 deletions src/build_MITgcm_ECCO.sh
Original file line number Diff line number Diff line change
@@ -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 ..

0 comments on commit e5df6b8

Please sign in to comment.