-
Notifications
You must be signed in to change notification settings - Fork 42
/
Copy pathDockerfile
22 lines (18 loc) · 872 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
FROM rocker/geospatial:latest
LABEL maintainer="Luigi Ranghetti <rpackages.ranghetti@gmail.com>"
# Install external dependencies
RUN apt update && apt install -y \
gdal-bin \
aria2 \
libpython2-dev && \
apt autoremove -y && \
rm -rf /var/lib/apt/lists/*
# Install the package
RUN R -e "remotes::install_github('ranghetti/sen2r', ref = 'main', dependencies = TRUE)"
# Create the user's files and settings, set runtime dependencies
RUN sudo -u rstudio mkdir /home/rstudio/.sen2r && \
sudo -u rstudio R -e 'sen2r::load_binpaths(c("aria2", "gdal"))' && \
sudo -u rstudio mkdir /home/rstudio/sen2cor && \
sudo -u rstudio mkdir /home/rstudio/sen2cor/sen2cor_255 && \
sudo -u rstudio R -e 'sen2r::install_sen2cor("/home/rstudio/sen2cor/sen2cor_255", version = "2.5.5")' && \
sudo -u rstudio R -e 'tmp <- sen2r::s2_tiles()'