gpt4 book ai didi

r - Dockerfile未安装ggmap

转载 作者:行者123 更新时间:2023-12-02 19:34:11 25 4
gpt4 key购买 nike

尝试通过Docker容器运行项目时出现错误。该镜像失败,并表示尽管已在Dockerfile中调用了ggmap,但尚未安装。

这是我的资料库的链接:https://github.com/TedHaley/tree_value.git

这是我的dockerfile的样子:

FROM rocker/tidyverse
RUN Rscript -e "install.packages('devtools')"
RUN Rscript -e "install.packages('ezknitr')"
RUN Rscript -e "install.packages('lubridate')"
RUN Rscript -e "install.packages('dplyr')"
RUN Rscript -e "install.packages('readr')"
RUN Rscript -e "install.packages('ggplot2')"
RUN Rscript -e "install.packages('rgdal')"
RUN Rscript -e "install.packages('broom')"
RUN Rscript -e "install.packages('maptools')"
RUN Rscript -e "install.packages('gpclib')"
RUN Rscript -e "install.packages('packrat')"
RUN Rscript -e "install.packages('MASS')"
RUN Rscript -e "install.packages('scales')"
RUN Rscript -e "install.packages('stringr')"
RUN Rscript -e "install.packages('hexbin')"
RUN Rscript -e "install.packages('reshape2')"

RUN Rscript -e "install.packages('ggmap', repos = 'http://cran.us.r-project.org')"

如果有人对为什么未正确安装 ggmap有任何想法,这将是巨大的帮助。

最佳答案

您的图片基于 rocker/tidyverse ,本身基于 rocker/rstudio rocker/-base
他们都没有安装ggmap。

例如参见 achubaty/r-spatial-devel ,它在

## install R spatial packages && cleanup 
RUN xvfb-run -a install.r \
geoR \
ggmap \

尝试从可以测试 ggmap存在的图像开始。

关于r - Dockerfile未安装ggmap,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47839907/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com