commit 6f9c6d448788731de8e02ab2601e0c2ff48d70c0 Author: Andrea Dell'Amico Date: Mon Jul 30 11:54:27 2018 +0200 First commit. diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..364c551 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,68 @@ +FROM sharelatex/sharelatex:latest + +MAINTAINER Andrea Dell'Amico + +RUN apt-get update && apt-get dist-upgrade -y + +RUN apt-get update && apt-get install -y \ + subversion \ + git \ + texlive texlive-full \ + gdal-bin \ + libgdal-dev \ + libgeos-dev \ + libspatialite-dev \ + proj-bin \ + proj-data \ + libproj-dev \ + libcurl4-openssl-dev \ + libnetcdf-dev \ + netcdf-bin \ + mono-runtime \ + libmono-microsoft-visualbasic10.0-cil \ + 'libmono-2.0-1' \ + 'libmono-corlib2.0-cil' \ + gsl-bin \ + libgsl0-dev \ + mesa-common-dev \ + libglu1-mesa-dev \ + postgis \ + postgresql-client + +RUN apt-get update && apt-get install -y \ + r-recommended \ + r-base \ + r-base-dev \ + r-base-html \ + r-base-core \ + r-doc-html \ + r-cran-boot \ + r-cran-cluster \ + r-cran-foreign \ + r-cran-kernsmooth \ + r-cran-lattice \ + r-cran-mgcv \ + r-cran-nlme \ + r-cran-rpart \ + r-cran-survival \ + r-cran-mass \ + r-cran-class \ + r-cran-nnet \ + r-cran-spatial \ + r-cran-codetools \ + r-cran-matrix \ + jags + +# copy the LatexMk file needed by knitr +COPY LatexMk /etc/LatexMk + +RUN mkdir -p /srv/d4science + +RUN ln -s /srv/d4science/RStudioConfiguration/.Rprofile /etc/R/Rprofile.site + +EXPOSE 80 + +WORKDIR / + +ENTRYPOINT ["/sbin/my_init"] + diff --git a/LatexMk b/LatexMk new file mode 100644 index 0000000..9830973 --- /dev/null +++ b/LatexMk @@ -0,0 +1,20 @@ +my $root_file = $ARGV[-1]; + +add_cus_dep( 'Rtex', 'tex', 0, 'rtex_to_tex'); +sub rtex_to_tex { + do_knitr("$_[0].Rtex"); +} + +sub do_knitr { + my $dirname = dirname $_[0]; + my $basename = basename $_[0]; + system("Rscript -e \"library('knitr'); setwd('$dirname'); knit('$basename')\""); +} + +my $rtex_file = $root_file =~ s/\.tex$/.Rtex/r; +unless (-e $root_file) { + if (-e $rtex_file) { + do_knitr($rtex_file); + } +} + diff --git a/README.md b/README.md new file mode 100644 index 0000000..c8ddc90 --- /dev/null +++ b/README.md @@ -0,0 +1,12 @@ +## README file of the D4Science ShareLatex repository +## Authors : Andrea Dell'Amico (ISTI-CNR) +## Creation date : July 25th, 2018 +## ALst update : July 30th, 2018 + +# I. Content : + +- Dockerfile file used to build a docker image +- Rprofile.site file used to set R local options +- README.md current information text file +- map_functions.R up-to-date R script containing the functions enabling the generation of a map using a CSV file and images +