Commit d0e8ec4a authored by Romulo Pereira Goncalves's avatar Romulo Pereira Goncalves
Browse files

Create a simplified version

parent 04ae3684
Pipeline #23838 canceled with stage
#!/usr/bin/env bash
context_dir="./context"
dockerfile="hasa.docker"
dockerfile="hasa_runner.docker"
runner_version="latest"
runner_tag="hasa_ci:$runner_version"
gitlab_runner="hasa_gitlab_CI_runner"
......
FROM ubuntu:20.04
RUN apt-get update -y && \
echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections && \
apt-get install -y -q dialog apt-utils && \
apt-get install libudunits2-dev build-essential bash-completion automake -y && \
apt-get install cmake zlib1g-dev libpng-dev libjpeg-dev -y && \
apt-get install wget vim zip unzip curl git jq apt-rdepends -y && \
apt-get install strace bzip2 cron make gcc -y
# add user hasa
RUN /bin/bash -i -c "\
groupadd -g 1000 hasa && \
useradd -g 1000 -u 1000 -m -s $(which bash) hasa && \
cat /root/.bashrc > /home/hasa/.bashrc \
"
# install dependencies
RUN apt-get update -y && \
apt-get install -y libjq-dev protobuf-compiler libprotobuf-dev proj-bin gdal-bin libgdal-dev jq libv8-dev pandoc
# install R
RUN /bin/bash -i -c "\
apt-get install -y dirmngr gnupg apt-transport-https ca-certificates software-properties-common && \
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9 && \
add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/' && \
apt-get install -y r-base \
"
# install IRkernel and HaSa
COPY install_runner.R /home/hasa/install_runner.R
RUN /bin/bash -i -c "\
Rscript /home/hasa/install_runner.R \
"
EXPOSE 8887
# Install IRkernel
install.packages("shiny")
# Install Hasa dependencies
install.packages("remotes")
install.packages("https://cran.r-project.org/src/contrib/Archive/BH/BH_1.69.0-1.tar.gz", repos=NULL, type="source")
install.packages("https://cran.r-project.org/src/contrib/Archive/sf/sf_0.9-0.tar.gz", repos=NULL, type="source")
install.packages("https://cran.r-project.org/src/contrib/Archive/sp/sp_1.4-4.tar.gz", repos=NULL, type="source", dependencies=TRUE)
install.packages("https://cran.r-project.org/src/contrib/Archive/rgdal/rgdal_1.5-12.tar.gz", repos=NULL, type="source")
# Install HaSa
library(remotes)
remotes::install_git(
"https://git.gfz-potsdam.de/habitat-sampler/HabitatSampler.git",
ref = "documentation",
subdir = "R-package",
dependencies = NA,
upgrade=FALSE,
build = TRUE,
build_manual = TRUE,
build_vignettes = TRUE
)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment