Running docker images issue
Closed this issue · 4 comments
Dear contributors,
I have created a docker image in which I insert the gstat as package to install.
During the creation of the docker image everything works perfectly, but when I go to run the docker image I have the follow error report
Warning: Error in : package or namespace load failed for ‘gstat’:
package slot missing from signature for generic ‘coerce’
and classes STFDF, RasterBrick
cannot use with duplicate class names (the package may need to be re-installed)
55: stop
54: value[[3L]]
53: tryCatchOne
52: tryCatchList
51: tryCatch
50: library
49: server
Error : package or namespace load failed for ‘gstat’:
package slot missing from signature for generic ‘coerce’
and classes STFDF, RasterBrick
When i am running the same code on the r installed locally it is working perfectly.
This issue started yesterday, only after installing sen2r github version devel
I don't know how to fix it, but i will report my Dockerfile
FROM rocker/r-ver:4.0.5
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 libpng-dev libpq-dev libproj-dev libsasl2-dev libssl-dev libudunits2-dev libxml2-dev make pandoc pandoc-citeproc 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("lubridate",upgrade="never", version = "1.8.0")'
RUN Rscript -e 'remotes::install_version("glue",upgrade="never", version = "1.6.0")'
RUN Rscript -e 'remotes::install_version("ggplot2",upgrade="never", version = "3.3.5")'
RUN Rscript -e 'remotes::install_version("shiny",upgrade="never", version = "1.7.1")'
RUN Rscript -e 'remotes::install_version("htmltools",upgrade="never", version = "0.5.2")'
RUN Rscript -e 'remotes::install_version("DBI",upgrade="never", version = "1.1.2")'
RUN Rscript -e 'remotes::install_version("xml2",upgrade="never", version = "1.3.2")'
RUN Rscript -e 'remotes::install_version("processx",upgrade="never", version = "3.5.2")'
RUN Rscript -e 'remotes::install_version("rmarkdown",upgrade="never", version = "2.11")'
RUN Rscript -e 'remotes::install_version("knitr",upgrade="never", version = "1.37")'
RUN Rscript -e 'remotes::install_version("data.table",upgrade="never", version = "1.14.2")'
RUN Rscript -e 'remotes::install_version("sp",upgrade="never", version = "1.4-6")'
RUN Rscript -e 'remotes::install_version("e1071",upgrade="never", version = "1.7-9")'
RUN Rscript -e 'remotes::install_version("plotly",upgrade="never", version = "4.10.0")'
RUN Rscript -e 'remotes::install_version("raster",upgrade="never", version = "3.5-11")'
RUN Rscript -e 'remotes::install_version("sf",upgrade="never", version = "1.0-5")'
RUN Rscript -e 'remotes::install_version("viridis",upgrade="never", version = "0.6.1")'
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("pkgload",upgrade="never", version = "1.2.2")'
RUN Rscript -e 'remotes::install_version("attempt",upgrade="never", version = "0.3.1")'
RUN Rscript -e 'remotes::install_version("plotrix",upgrade="never", version = "3.8-2")'
RUN Rscript -e 'remotes::install_version("DT",upgrade="never", version = "0.20")'
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("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.6.1")'
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("testthat",upgrade="never", version = "3.1.0")'
RUN Rscript -e 'remotes::install_version("config",upgrade="never", version = "0.3.1")'
RUN Rscript -e 'remotes::install_version("tidymodels",upgrade="never", version = "0.1.4")'
RUN Rscript -e 'remotes::install_version("shinymanager",upgrade="never", version = "1.0.400")'
RUN Rscript -e 'remotes::install_version("tidyverse",upgrade="never", version = "1.3.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("SpatialPosition",upgrade="never", version = "2.1.1")'
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.2")'
RUN Rscript -e 'remotes::install_version("shinyvalidate",upgrade="never", version = "0.1.1")'
RUN Rscript -e 'remotes::install_version("shinyjs",upgrade="never", version = "2.0.0")'
RUN Rscript -e 'remotes::install_version("shinyalert",upgrade="never", version = "2.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.2")'
RUN Rscript -e 'remotes::install_version("RStoolbox",upgrade="never", version = "0.2.6")'
RUN Rscript -e 'remotes::install_version("RPostgres",upgrade="never", version = "1.4.1")'
RUN Rscript -e 'remotes::install_version("randomForest",upgrade="never", version = "4.6-14")'
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.0")'
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("golem",upgrade="never", version = "0.3.1")'
RUN Rscript -e 'remotes::install_version("glmnet",upgrade="never", version = "4.1-2")'
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_version("gstat",upgrade="never", version = "2.0.8")'
RUN Rscript -e 'remotes::install_github("r-lib/rlang@dc03e4473000d0424dacd4c8cf08211b7fb8bc97")'
RUN Rscript -e 'remotes::install_github("JohnCoene/waiter@ce5fdaa1fc1224ba657c0906c7900b275cfee1d7")'
RUN Rscript -e 'remotes::install_github("mablab/rpostgis@74a6ac71bcc21b7b5edf0ed6b59dcbfd4d7bfc59")'
RUN Rscript -e 'remotes::install_github("r-spatial/mapedit@8328411a45513f788dc25e6b4214df53363d6494")'
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');webapp::run_app()"
Thanks to help me.
A update of this issue is the follow.
i have removed and installed again the gstat package.
But when i tried to load it, i have the follow error
Error: caricamento pacchetto o namespace fallito per ‘gstat’:
package slot missing from signature for generic ‘coerce’
and classes STFDF, RasterBrick
cannot use with duplicate class names (the package may need to be re-installed)
The same issue is on the FRK package.
Maybe you could find the problem by creating a minimal docker file that reproduces this problem. I, for instance, cannot run your app in /build_zone
, because you didn't share it.
Thanks to your friendly reply.
I will create a docker image on the dockerhub, in order to provide to you all the files and setting to find where is the problem.
I will let you know when the docker images is ready to be downloaded
Thanks again.
It is solved this issue.
I have just update all the R package and now is working proprely