-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
reset rf
- Loading branch information
Showing
5 changed files
with
149 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,48 @@ | ||
FROM r-base:4.3.0 | ||
# Use a stable Ubuntu version | ||
FROM rocker/rstudio:4.3 | ||
|
||
# Install software dependencies | ||
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y software-properties-common cmake g++ git supervisor wget | ||
# Install essential tools | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
ENV TZ=Etc/UTC | ||
RUN apt-get install -y libnetcdf-dev libcurl4-openssl-dev libcpprest-dev doxygen graphviz libsqlite3-dev libboost-all-dev | ||
RUN apt-get update && apt-get install -y libproj-dev libgdal-dev | ||
|
||
# Install devtools package | ||
RUN R -e "install.packages('devtools')" | ||
|
||
# Install gdalcubes package | ||
RUN R -e "install.packages('gdalcubes')" | ||
|
||
# install other necessary packages | ||
RUN apt-get update && apt-get install -y \ | ||
software-properties-common \ | ||
cmake \ | ||
g++ \ | ||
git \ | ||
supervisor \ | ||
wget | ||
|
||
# Install dependencies | ||
RUN apt-get install -y \ | ||
libnetcdf-dev \ | ||
libcurl4-openssl-dev \ | ||
libcpprest-dev \ | ||
doxygen \ | ||
graphviz \ | ||
libsqlite3-dev \ | ||
libboost-all-dev | ||
|
||
# Install devtools in R | ||
RUN Rscript -e "install.packages(c('devtools'))" | ||
|
||
# Install additional R packages | ||
RUN apt-get install -y libsodium-dev libudunits2-dev | ||
RUN Rscript -e "install.packages(c('plumber', 'useful', 'ids', 'R6', 'sf', 'rstac','bfast'))" | ||
RUN Rscript -e "install.packages(c('plumber', 'useful', 'ids', 'R6', 'sf', 'rstac','bfast', 'stars', 'geojsonsf'))" | ||
RUN Rscript -e "install.packages('sits')" | ||
RUN Rscript -e "install.packages('gdalcubes')" | ||
|
||
# create directories | ||
RUN mkdir -p /opt/dockerfiles/ && mkdir -p /var/openeo/workspace/ && mkdir -p /var/openeo/workspace/data/ | ||
# Create directories | ||
RUN mkdir -p /opt/dockerfiles/ \ | ||
&& mkdir -p /var/openeo/workspace/ \ | ||
&& mkdir -p /var/openeo/workspace/data/ | ||
|
||
# install packages from local directory | ||
# Install local packages | ||
COPY ./ /opt/dockerfiles/ | ||
RUN Rscript -e "remotes::install_local('/opt/dockerfiles',dependencies=TRUE)" | ||
RUN Rscript -e "remotes::install_local('/opt/dockerfiles', dependencies=TRUE)" | ||
|
||
# cmd or entrypoint for startup | ||
# Set the startup command | ||
CMD ["R", "-q", "--no-save", "-f /opt/dockerfiles/Dockerfiles/start.R"] | ||
|
||
# Expose port | ||
EXPOSE 8000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,15 @@ | ||
# Start service | ||
library(openeosits) | ||
|
||
aws.host <-Sys.getenv("AWSHOST") | ||
aws.host <- Sys.getenv("AWSHOST") | ||
|
||
if (aws.host == ""){ | ||
aws.host = NULL | ||
}else{ | ||
message("AWS host port id is:", aws.host) | ||
|
||
} | ||
|
||
|
||
config = SessionConfig(api.port = 8000, host = "0.0.0.0", aws.ipv4 = aws.host) | ||
config$workspace.path = "/var/openeo/workspace" | ||
config <- SessionConfig(api.port = 8000, host = "0.0.0.0", aws.ipv4 = aws.host) | ||
config$workspace.path <- "/var/openeo/workspace" | ||
createSessionInstance(config) | ||
Session$startSession() | ||
Session$startSession() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters