Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem to install FIELDImageR in costum dockerfile #41

Open
agronomofiorentini opened this issue May 1, 2023 · 0 comments
Open

Problem to install FIELDImageR in costum dockerfile #41

agronomofiorentini opened this issue May 1, 2023 · 0 comments

Comments

@agronomofiorentini
Copy link

Dear Authors,
First of all thanks to make pubblic availble this package case is really usefull.

This isssue is related to #32

I would like to add the package to a docker container but i am getting a lot of problem

This is my dockerfile.

FROM rocker/verse:4.2.0
RUN groupadd -g 61000 docker
RUN useradd -g 61000 -l -M -s /bin/false -u 61000 docker
RUN apt-get update && apt-get install -y curl 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 libsqlite3-dev libv8-dev libxml2-dev make pandoc pandoc-citeproc protobuf-compiler libprotoc-dev zlib1g-dev libfftw3-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 curl -LO https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && \
    apt-get update -qq && \
    apt-get -y install \
    ./google-chrome-stable_current_amd64.deb && \
    rm google-chrome-stable_current_amd64.deb
RUN mkdir -p /usr/local/lib/R/etc/ /usr/lib/R/etc/
RUN echo "options(repos = c(CRAN = 'https://cran.rstudio.com/'), download.file.method = 'libcurl', Ncpus = 4)" | tee /usr/local/lib/R/etc/Rprofile.site | tee /usr/lib/R/etc/Rprofile.site
RUN R -e 'install.packages("remotes")'
RUN Rscript -e 'remotes::install_version("htmltools",upgrade="never", version = "0.5.3")'
RUN Rscript -e 'remotes::install_version("stringr",upgrade="never", version = "1.5.0")'
RUN Rscript -e 'remotes::install_version("processx",upgrade="never", version = "3.8.0")'
RUN Rscript -e 'remotes::install_version("rmarkdown",upgrade="never", version = "2.18")'
RUN Rscript -e 'remotes::install_version("knitr",upgrade="never", version = "1.41")'
RUN Rscript -e 'remotes::install_version("glue",upgrade="never", version = "1.6.2")'
RUN Rscript -e 'remotes::install_version("data.table",upgrade="never", version = "1.14.6")'
RUN Rscript -e 'remotes::install_version("DBI",upgrade="never", version = "1.1.3")'
RUN Rscript -e 'remotes::install_version("lubridate",upgrade="never", version = "1.9.0")'
RUN Rscript -e 'remotes::install_version("ggplot2",upgrade="never", version = "3.4.0")'
RUN Rscript -e 'remotes::install_version("shiny",upgrade="never", version = "1.7.3")'
RUN Rscript -e 'remotes::install_version("e1071",upgrade="never", version = "1.7-12")'
RUN Rscript -e 'remotes::install_version("sp",upgrade="never", version = "1.5-0")'
RUN Rscript -e 'remotes::install_version("sf",upgrade="never", version = "1.0-9")'
RUN Rscript -e 'remotes::install_version("raster",upgrade="never", version = "3.6-11")'
RUN Rscript -e 'remotes::install_version("forecast",upgrade="never", version = "8.19")'
RUN Rscript -e 'remotes::install_version("plotly",upgrade="never", version = "4.10.1")'
RUN Rscript -e 'remotes::install_version("viridis",upgrade="never", version = "0.6.2")'
RUN Rscript -e 'remotes::install_version("leaflet",upgrade="never", version = "2.1.1")'
RUN Rscript -e 'remotes::install_version("xml2",upgrade="never", version = "1.3.3")'
RUN Rscript -e 'remotes::install_version("zip",upgrade="never", version = "2.2.2")'
RUN Rscript -e 'remotes::install_version("pkgload",upgrade="never", version = "1.3.2")'
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.3")'
RUN Rscript -e 'remotes::install_version("readxl",upgrade="never", version = "1.4.1")'
RUN Rscript -e 'remotes::install_version("DT",upgrade="never", version = "0.26")'
RUN Rscript -e 'remotes::install_version("rgdal",upgrade="never", version = "1.6-3")'
RUN Rscript -e 'remotes::install_version("rgeos",upgrade="never", version = "0.6-1")'
RUN Rscript -e 'remotes::install_version("reshape",upgrade="never", version = "0.8.9")'
RUN Rscript -e 'remotes::install_version("gstat",upgrade="never", version = "2.1-0")'
RUN Rscript -e 'remotes::install_version("gt",upgrade="never", version = "0.8.0")'
RUN Rscript -e 'remotes::install_version("timetk",upgrade="never", version = "2.8.2")'
RUN Rscript -e 'remotes::install_version("mapview",upgrade="never", version = "2.11.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.2")'
RUN Rscript -e 'remotes::install_version("tidymodels",upgrade="never", version = "1.0.0")'
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.410")'
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.5")'
RUN Rscript -e 'remotes::install_version("spelling",upgrade="never", version = "2.2")'
RUN Rscript -e 'remotes::install_version("ranger",upgrade="never", version = "0.14.1")'
RUN Rscript -e 'remotes::install_version("collapse",upgrade="never", version = "1.8.9")'
RUN Rscript -e 'remotes::install_version("cubeview",upgrade="never", version = "0.2.0")'
RUN Rscript -e 'remotes::install_version("echarts4r",upgrade="never", version = "0.4.4")'
RUN Rscript -e 'remotes::install_version("automap",upgrade="never", version = "1.0-16")'
RUN Rscript -e 'remotes::install_version("writexl",upgrade="never", version = "1.4.1")'
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("shinyWidgets",upgrade="never", version = "0.7.5")'
RUN Rscript -e 'remotes::install_version("shinyvalidate",upgrade="never", version = "0.1.2")'
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.4")'
RUN Rscript -e 'remotes::install_version("RMySQL",upgrade="never", version = "0.10.24")'
RUN Rscript -e 'remotes::install_version("randomForest",upgrade="never", version = "4.7-1.1")'
RUN Rscript -e 'remotes::install_version("pagedown",upgrade="never", version = "0.19")'
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.1")'
RUN Rscript -e 'remotes::install_version("nasapower",upgrade="never", version = "4.0.8")'
RUN Rscript -e 'remotes::install_version("modeltime",upgrade="never", version = "1.2.4")'
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.2.0")'
RUN Rscript -e 'remotes::install_version("kableExtra",upgrade="never", version = "1.3.4")'
RUN Rscript -e 'remotes::install_version("golem",upgrade="never", version = "0.3.5")'
RUN Rscript -e 'remotes::install_version("glmnet",upgrade="never", version = "4.1-6")'
RUN Rscript -e 'remotes::install_version("geojsonlint",upgrade="never", version = "0.4.0")'
RUN Rscript -e 'remotes::install_version("geojsonio",upgrade="never", version = "0.10.0")'
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.1.0")'
RUN Rscript -e 'remotes::install_version("shiny.pwa",upgrade="never", version = "0.2.1")'
RUN Rscript -e 'remotes::install_version("httr",upgrade="never", version = "1.4.4")'
RUN Rscript -e 'remotes::install_version("jsonlite",upgrade="never", version = "1.8.4")'
RUN Rscript -e 'remotes::install_version("agroclim",upgrade="never", version = "0.3.0")'
RUN Rscript -e 'remotes::install_version("pollen",upgrade="never", version = "0.82.0")'
RUN Rscript -e 'remotes::install_github("rfortherestofus/pagedreport@ace07abe531009a3d675bfbb36c63adc20e3482f")'
RUN Rscript -e 'remotes::install_github("Appsilon/shiny.i18n@e11ea740994be5787066e29d4f9e17dee3772da5")'
RUN Rscript -e 'remotes::install_github("filipematias23/cleanRfield@ce8edc5ceaf3cd82f620702be965f623ff1951b0")'
RUN Rscript -e 'remotes::install_github("ropensci/skimr@4c48f8e1c7dd6f58c7eabf178fbbd1e664793591")'
RUN Rscript -e 'remotes::install_github("MichelNivard/gptstudio@055558509abdc7140ea9801140753be49e436d05")'
RUN Rscript -e 'install.packages("emayili")'
RUN Rscript -e 'install.packages("devtools")'
RUN R -e 'devtools::install_github("OpenDroneMap/FIELDimageR"); if (!library(FIELDimageR, logical.return=T)) quit(status=10);'
RUN mkdir /build_zone
ADD . /build_zone
WORKDIR /build_zone
RUN R -e 'options(warn = 2);remotes::install_local(upgrade="never")'
EXPOSE 587/tcp
EXPOSE 80
CMD R -e "options('shiny.port'=80,shiny.host='0.0.0.0');webapp4::run_app()"

And when i am checking if the package is installed with the following command

"if (!library(FIELDimageR, logical.return=T)) quit(status=10)"

I have the following error output

 Error: .onLoad failed in loadNamespace() for 'tcltk', details:
#107 183.3   call: dyn.load(file, DLLpath = DLLpath, ...)
#107 183.3   error: unable to load shared object '/usr/local/lib/R/library/tcltk/libs/tcltk.so':
#107 183.3   libtcl8.6.so: cannot open shared object file: No such file or directory
#107 183.3 Execution halted
#107 183.3 ERROR: lazy loading failed for package ‘misc3d’
#107 183.3 * removing ‘/usr/local/lib/R/site-library/misc3d’
#107 183.3 cat: plot3D.out: No such file or directory
#107 183.3 cat: ks.out: No such file or directory
#107 183.3 cat: spatialEco.out: No such file or directory
#107 183.3
#107 183.3 The downloaded source packages are in
#107 183.3      ‘/tmp/Rtmp84B6zK/downloaded_packages’
#107 183.5 * checking for file ‘/tmp/Rtmp84B6zK/remotes7692aef91/OpenDroneMap-FIELDimageR-c0a3f92/DESCRIPTION’ ... OK
#107 183.5 * preparing ‘FIELDimageR’:
#107 183.5 * checking DESCRIPTION meta-information ... OK
#107 183.6 * checking for LF line-endings in source and make files and shell scripts
#107 183.6 * checking for empty or unneeded directories
#107 183.6 Omitted ‘LazyData’ from DESCRIPTION
#107 183.6 * building ‘FIELDimageR_0.3.3.tar.gz’
#107 183.6
#107 183.6 Installing package into ‘/usr/local/lib/R/site-library’
#107 183.6 (as ‘lib’ is unspecified)
#107 183.8 ERROR: dependency ‘spatialEco’ is not available for package ‘FIELDimageR’
#107 183.8 * removing ‘/usr/local/lib/R/site-library/FIELDimageR’
#107 183.8 Warning messages:
#107 183.8 1: In i.p(...) : installation of one or more packages failed,
#107 183.8   probably ‘misc3d’, ‘plot3D’, ‘ks’, ‘spatialEco’
#107 183.8 2: In i.p(...) :
#107 183.8   installation of package ‘/tmp/Rtmp84B6zK/file74ef0e5a6/FIELDimageR_0.3.3.tar.gz’ had non-zero exit status
#107 183.8 Warning message:
#107 183.8 In library(FIELDimageR, logical.return = T) :
#107 183.8   there is no package called ‘FIELDimageR’
------
executor failed running [/bin/sh -c R -e 'devtools::install_github("OpenDroneMap/FIELDimageR"); if (!library(FIELDimageR, logical.return=T)) quit(status=10);']: exit code: 10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant