forked from ranghetti/sen2r
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
30 lines (23 loc) · 961 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
FROM rocker/geospatial:3.5.1
LABEL maintainer="Luigi Ranghetti <[email protected]>"
# Install external dependencies
RUN apt-get update && apt-get install -y \
gdal-bin \
python-gdal \
aria2 \
libpython-dev \
libv8-3.14-dev && \
apt-get autoremove -y && \
rm -rf /var/lib/apt/lists/*
# Install lwgeom from remote (https://github.com/rocker-org/geospatial/issues/17)
RUN R -e "remotes::install_github('r-spatial/lwgeom', dependencies = TRUE)"
# Install the package
RUN R -e "remotes::install_github('ranghetti/sen2r', ref = 'master', dependencies = TRUE)"
# Install internal dependencies and configure
RUN R -e 'sen2r:::load_binpaths(c("python", "aria2", "gdal", "sen2cor"))'
# Download vector of S2 tiles
RUN R -e 'sen2r::s2_tiles()'
# Allow user rstudio to use sen2cor
RUN mkdir /root/sen2cor/2.5/log && \
chmod -R 0777 /root && \
chmod -R 0777 /usr/local/lib/R/site-library/sen2r/sen2cor_2-5-5