我已经在 Deepnote 中设置了一个带有 R 内核的自定义环境,我想使用 Dockerfile 来安装马赛克包(否则我必须每天手动安装它,这需要一段时间)。当我添加
RUN R -e 'install.packages("mosaic")'
IRkernel::installspec
在 Dockerfile 中的行之后,我得到以下输出:
Step #1: > install.packages("mosaic")
Step #1: Installing package into ‘/usr/local/lib/R/site-library’
Step #1: (as ‘lib’ is unspecified)
Step #1: Warning in install.packages("mosaic") :
Step #1: 'lib = "/usr/local/lib/R/site-library"' is not writable
Step #1: Error in install.packages("mosaic") : unable to install packages
Step #1: Execution halted
Step #1: The command '/bin/sh -c R -e 'install.packages("mosaic")'' returned a non-zero code: 1
Finished Step #1
ERROR
ERROR: build step 1 "gcr.io/cloud-builders/docker" failed: step exited with non-zero status: 1
Step #1:
我究竟做错了什么?