FROM rocker/geospatial:4
RUN export DEBIAN_FRONTEND=noninteractive; apt-get -y update \
 && apt-get install -y pandoc \
    pandoc-citeproc
RUN R -e "install.packages('remotes')"
RUN R -e "install.packages('microbenchmark')"
RUN R -e "install.packages('purrr')" # map function
RUN R -e "install.packages('BiocManager')" # map function
RUN R -e "BiocManager::install('BiocPkgTools')"
RUN R -e "install.packages('httr')" # GET function
ENV R_CRAN_WEB="https://cran.rstudio.com/"
RUN R -e "install.packages('cowplot')" # GET function
RUN R -e "install.packages('torch')"
RUN R -e "torch::install_torch(type = 'cpu')"
RUN R -e "install.packages('PLNmodels')"
RUN R -e "install.packages('torchvision')"
RUN apt-get update \
 && apt-get install -y --no-install-recommends \
  jags \
  mercurial gdal-bin libgdal-dev gsl-bin libgsl-dev \
  libc6-i386
RUN R -e "install.packages('INLA',repos=c(getOption('repos'),INLA='https://inla.r-inla-download.org/R/stable'), dep=TRUE)"
RUN R -e "install.packages('reticulate')"
RUN R -e "install.packages(c('inlabru', 'lme4', 'ggpolypath', 'RColorBrewer', 'geoR'))"
RUN R -e "install.packages(c('tidymodels', 'brulee', 'reprex'))"
RUN R -e "install.packages(c('poissonreg'))"
RUN apt-get install -y --no-install-recommends unzip python3-pip dvipng pandoc wget git make python3-venv && \
    pip3 install jupyter jupyter-cache flatlatex matplotlib && \
    apt-get --purge -y remove texlive.\*-doc$ && \
    apt-get clean
RUN pip3 install jax jaxlib torch numpy matplotlib pandas scikit-learn torchvision torchaudio
RUN pip3 install pyplnmodels
RUN pip3 install optax
Instructions pour le dépot sur le site web
Processus de mise en commun des ateliers
- Créer une branche propre à l’atelier nommée explicitement 
mon_nom_parlantet basculer dessus 
git checkout -b mon_nom_parlant
- Créer un fichier Rmarkdown de restitution de votre atelier 
fichier.Rmddans votre branche 
git add fichier.Rmd
git commit -m "restitution atelier"
- Pousser vos modifications sur le serveur distant
 
git  push --set-upstream origin mon_nom_parlant ou
git  push
Faire une pull request (PR) sur github
indiquer dans le message de la PR la liste des packages ou autres besoins
Quand la PR passe les tests, demander le merge.
corriger les erreurs éventuelles dans la compilation du Rmarkdown
les admins peuvent avoir à mettre à jour l’image docker
Détails du fonctionnement
Le docker
(Lien vers la fiche pense-bête)[https://www.docker.com/sites/default/files/d8/2019-09/docker-cheat-sheet.pdf]
Pour créer des images Docker en local sur sa machine, voici une liste de commandes utiles
- Pour construire une image docker, il faut créer un fichier Dockerfile qui contient la recette du Docker. Pour ce site le ficher Dockerfile a la forme suivante
 
puis demander la construction de l’image à l’aide de la commande
 docker build -t nom_depot_dockerhub/nom_du_repo:version  . ## avec un nomet enfin pousser sur Dockerhub
 docker push nom_depot_dockerhub/nom_du_repo:versionLes actions
Dans les action de Github, on peut spécifier un container docker à utiliser, c’est ce que fait la ligne container du fichier d’action suivant, utiliser pour créer ce site web
name: website
on:
  push:
    branches:
      - main
jobs:
  build:
    name: Build website with rmarkdown
    runs-on: ubuntu-latest
    container: stateofther/r-finistr2023:0.5
    steps:
      - name: Checkout repository
        uses: actions/checkout@v2
      - name: Additional Packages
        run: Rscript -e "install.packages(c('ggbeeswarm', 'tictoc', 'bench', 'circlize', 'JuliaCall', 'GeoModels'))"
      - name: erase R-Julia-Geostats.qmd and fixing version
        run: rm "R-Julia-Geostats.qmd" "R-Julia-Geostats-v-fixing.qmd"
      - name: Generate slides
        run: "quarto render"
      - name: GitHub Pages action
        uses: peaceiris/actions-gh-pages@v3
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          publish_dir: ./_site