OpenDroneMap / FIELDimageR

FIELDimageR: A R package to analyze orthomosaic images from agricultural field trials. This package is a compilation of functions to analyze pos-mosaicking images from research fields, and allows to: crop the image; remove soil effect; build vegetation indices; rotate the image; build the plot shapefile; extract information for each plot; and evaluate stand count, canopy percentage, and plant height.
GNU General Public License v2.0
230 stars 89 forks source link

problems installing FIELDimageR in docker #32

Open agronomofiorentini opened 2 years ago

agronomofiorentini commented 2 years ago

Dear maintainers, First all of, thanks to develop this package which is a great tool that i am using mostly for image crop/soil segmentation.

I have a problem in order to build a docker image, that has inside the FIELDimageR package.

This is my dockerfile

FROM rocker/r-ver:4.1.2
RUN apt-get update && apt-get install -y  gdal-bin git-core imagemagick libcurl4-openssl-dev libfontconfig1-dev libgdal-dev libgeos-dev libgeos++-dev libgit2-dev libicu-dev libjq-dev libpng-dev libpq-dev libproj-dev libprotobuf-dev libsasl2-dev libssl-dev libudunits2-dev libv8-dev libxml2-dev make pandoc pandoc-citeproc protobuf-compiler libprotoc-dev zlib1g-dev && rm -rf /var/lib/apt/lists/*
RUN echo "options(repos = c(CRAN = 'https://cran.rstudio.com/'), download.file.method = 'libcurl', Ncpus = 4)" >> /usr/local/lib/R/etc/Rprofile.site
RUN R -e 'install.packages("remotes")'
RUN Rscript -e 'remotes::install_version("glue",upgrade="never", version = "1.6.2")'
RUN Rscript -e 'remotes::install_version("xml2",upgrade="never", version = "1.3.3")'
RUN Rscript -e 'remotes::install_version("htmltools",upgrade="never", version = "0.5.2")'
RUN Rscript -e 'remotes::install_version("processx",upgrade="never", version = "3.5.2")'
RUN Rscript -e 'remotes::install_version("ggplot2",upgrade="never", version = "3.3.5")'
RUN Rscript -e 'remotes::install_version("data.table",upgrade="never", version = "1.14.2")'
RUN Rscript -e 'remotes::install_version("DBI",upgrade="never", version = "1.1.2")'
RUN Rscript -e 'remotes::install_version("lubridate",upgrade="never", version = "1.8.0")'
RUN Rscript -e 'remotes::install_version("shiny",upgrade="never", version = "1.7.1")'
RUN Rscript -e 'remotes::install_version("e1071",upgrade="never", version = "1.7-9")'
RUN Rscript -e 'remotes::install_version("sp",upgrade="never", version = "1.4-6")'
RUN Rscript -e 'remotes::install_version("sf",upgrade="never", version = "1.0-6")'
RUN Rscript -e 'remotes::install_version("raster",upgrade="never", version = "3.5-15")'
RUN Rscript -e 'remotes::install_version("plotly",upgrade="never", version = "4.10.0")'
RUN Rscript -e 'remotes::install_version("viridis",upgrade="never", version = "0.6.2")'
RUN Rscript -e 'remotes::install_version("leaflet",upgrade="never", version = "2.0.4.1")'
RUN Rscript -e 'remotes::install_version("zip",upgrade="never", version = "2.2.0")'
RUN Rscript -e 'remotes::install_version("plotrix",upgrade="never", version = "3.8-2")'
RUN Rscript -e 'remotes::install_version("rvest",upgrade="never", version = "1.0.2")'
RUN Rscript -e 'remotes::install_version("readxl",upgrade="never", version = "1.3.1")'
RUN Rscript -e 'remotes::install_version("googlesheets4",upgrade="never", version = "1.0.0")'
RUN Rscript -e 'remotes::install_version("DT",upgrade="never", version = "0.20")'
RUN Rscript -e 'remotes::install_version("rgdal",upgrade="never", version = "1.5-28")'
RUN Rscript -e 'remotes::install_version("rgeos",upgrade="never", version = "0.5-9")'
RUN Rscript -e 'remotes::install_version("timetk",upgrade="never", version = "2.7.0")'
RUN Rscript -e 'remotes::install_version("mapview",upgrade="never", version = "2.10.0")'
RUN Rscript -e 'remotes::install_version("leaflet.extras",upgrade="never", version = "1.0.0")'
RUN Rscript -e 'remotes::install_version("config",upgrade="never", version = "0.3.1")'
RUN Rscript -e 'remotes::install_version("attempt",upgrade="never", version = "0.3.1")'
RUN Rscript -e 'remotes::install_version("waiter",upgrade="never", version = "0.2.5")'
RUN Rscript -e 'remotes::install_version("tidyverse",upgrade="never", version = "1.3.1")'
RUN Rscript -e 'remotes::install_version("tidymodels",upgrade="never", version = "0.1.4")'
RUN Rscript -e 'remotes::install_version("SpatialPosition",upgrade="never", version = "2.1.1")'
RUN Rscript -e 'remotes::install_version("shinymanager",upgrade="never", version = "1.0.400")'
RUN Rscript -e 'remotes::install_version("RStoolbox",upgrade="never", version = "0.3.0")'
RUN Rscript -e 'remotes::install_version("rpostgis",upgrade="never", version = "1.4.3")'
RUN Rscript -e 'remotes::install_version("testthat",upgrade="never", version = "3.1.1")'
RUN Rscript -e 'remotes::install_version("spelling",upgrade="never", version = "2.2")'
RUN Rscript -e 'remotes::install_version("writexl",upgrade="never", version = "1.4.0")'
RUN Rscript -e 'remotes::install_version("weathermetrics",upgrade="never", version = "1.2.2")'
RUN Rscript -e 'remotes::install_version("SPEI",upgrade="never", version = "1.7")'
RUN Rscript -e 'remotes::install_version("spdplyr",upgrade="never", version = "0.4.0")'
RUN Rscript -e 'remotes::install_version("skimr",upgrade="never", version = "2.1.3")'
RUN Rscript -e 'remotes::install_version("shinyWidgets",upgrade="never", version = "0.6.4")'
RUN Rscript -e 'remotes::install_version("shinyvalidate",upgrade="never", version = "0.1.1")'
RUN Rscript -e 'remotes::install_version("shinyjs",upgrade="never", version = "2.1.0")'
RUN Rscript -e 'remotes::install_version("shinycssloaders",upgrade="never", version = "1.0.0")'
RUN Rscript -e 'remotes::install_version("shinyalert",upgrade="never", version = "3.0.0")'
RUN Rscript -e 'remotes::install_version("sever",upgrade="never", version = "0.0.7")'
RUN Rscript -e 'remotes::install_version("rtsdata",upgrade="never", version = "0.1.3")'
RUN Rscript -e 'remotes::install_version("RPostgres",upgrade="never", version = "1.4.3")'
RUN Rscript -e 'remotes::install_version("randomForest",upgrade="never", version = "4.7-1")'
RUN Rscript -e 'remotes::install_version("owmr",upgrade="never", version = "0.8.2")'
RUN Rscript -e 'remotes::install_version("NbClust",upgrade="never", version = "3.0")'
RUN Rscript -e 'remotes::install_version("nasapower",upgrade="never", version = "4.0.6")'
RUN Rscript -e 'remotes::install_version("modeltime",upgrade="never", version = "1.1.1")'
RUN Rscript -e 'remotes::install_version("measurements",upgrade="never", version = "1.4.0")'
RUN Rscript -e 'remotes::install_version("mapedit",upgrade="never", version = "0.6.0")'
RUN Rscript -e 'remotes::install_version("leaflet.extras2",upgrade="never", version = "1.1.0")'
RUN Rscript -e 'remotes::install_version("gstat",upgrade="never", version = "2.0-8")'
RUN Rscript -e 'remotes::install_version("golem",upgrade="never", version = "0.3.2")'
RUN Rscript -e 'remotes::install_version("geojsonlint",upgrade="never", version = "0.4.0")'
RUN Rscript -e 'remotes::install_version("geojsonio",upgrade="never", version = "0.9.4")'
RUN Rscript -e 'remotes::install_version("earth",upgrade="never", version = "5.3.1")'
RUN Rscript -e 'remotes::install_version("climatol",upgrade="never", version = "3.1.2")'
RUN Rscript -e 'remotes::install_version("cicerone",upgrade="never", version = "1.0.4")'
RUN Rscript -e 'remotes::install_version("bs4Dash",upgrade="never", version = "2.0.3")'
RUN Rscript -e 'remotes::install_github("filipematias23/FIELDimageR@09923cfa768a638023dd88242097b4e77d4f2439")'
RUN mkdir /build_zone
ADD . /build_zone
WORKDIR /build_zone
RUN R -e 'options(warn = 2);remotes::install_local(upgrade="never")'
EXPOSE 80
CMD R -e "options('shiny.port'=80,shiny.host='0.0.0.0');webapp4::run_app()"

And when i use the docker build command in the line "RUN R -e 'options(warn = 2);remotes::install_local(upgrade="never")'"

I have the follow error output

 => ERROR [76/76] RUN R -e 'options(warn = 2);remotes::install_local(upgrade="never")'                                                                                                                       45.7s
------
 > [76/76] RUN R -e 'options(warn = 2);remotes::install_local(upgrade="never")':
#80 0.742
#80 0.742 R version 4.1.2 (2021-11-01) -- "Bird Hippie"
#80 0.742 Copyright (C) 2021 The R Foundation for Statistical Computing
#80 0.742 Platform: x86_64-pc-linux-gnu (64-bit)
#80 0.742
#80 0.742 R is free software and comes with ABSOLUTELY NO WARRANTY.
#80 0.742 You are welcome to redistribute it under certain conditions.
#80 0.742 Type 'license()' or 'licence()' for distribution details.
#80 0.742
#80 0.742   Natural language support but running in an English locale
#80 0.742
#80 0.742 R is a collaborative project with many contributors.
#80 0.742 Type 'contributors()' for more information and
#80 0.742 'citation()' on how to cite R or R packages in publications.
#80 0.742
#80 0.743 Type 'demo()' for some demos, 'help()' for on-line help, or
#80 0.743 'help.start()' for an HTML browser interface to help.
#80 0.743 Type 'q()' to quit R.
#80 0.743
#80 0.828 > options(warn = 2);remotes::install_local(upgrade="never")
#80 3.819 * checking for file ‘/tmp/RtmpUhb2pN/file837fdb88f/build_zone/DESCRIPTION’ ... OK
#80 4.068 * preparing ‘webapp4’:
#80 4.068 * checking DESCRIPTION meta-information ... OK
#80 4.555 * checking for LF line-endings in source and make files and shell scripts
#80 4.556 * checking for empty or unneeded directories
#80 4.564 * building ‘webapp4_0.0.0.9000.tar.gz’
#80 29.85
#80 30.20 Installing package into ‘/usr/local/lib/R/site-library’
#80 30.20 (as ‘lib’ is unspecified)
#80 43.72 ERROR: dependency ‘FIELDimageR’ is not available for package ‘webapp4’
#80 43.72 * removing ‘/usr/local/lib/R/site-library/webapp4’
#80 45.60 Error: Failed to install 'webapp4' from local:
#80 45.60   (converted from warning) installation of package ‘/tmp/RtmpUhb2pN/file84c59464f/webapp4_0.0.0.9000.tar.gz’ had non-zero exit status
#80 45.60 Execution halted
------
executor failed running [/bin/sh -c R -e 'options(warn = 2);remotes::install_local(upgrade="never")']: exit code: 1

Do you know how can i solve this issue?