opencpu does not show installed packages

拜拜、爱过 提交于 2019-12-10 17:31:42

问题


Let me confess first I am new to Docker / opencpu world. here is the issue.

  1. I installed Docker from opencpu site on my windows 10 box.
  2. I was able to successfully run the docker by "docker run --name myDocker -t -p 80:80 -p 8004:8004 opencpu/rstudio".
  3. I successfully installed my R package by "R CMD INSTALL /tmp/AnotherPackage_0.1.0.tar.gz".
  4. Only issue now is I cant see my Package in http://localhost/ocpu/test/. so in below figure I cant see my package in right box (which shows all the other packages).

If I do /library/AnotherPackage in Endpoint text box I can see my package's description etc..


回答1:


You probably installed the package in another library. Can you show us the output of your R CMD INSTALL line? In particular the final line that starts with installing to....

To install into the global library, either install as user opencpu:

sudo su opencpu
R CMD INSTALL /tmp/AnotherPackage_0.1.0.tar.gz

Or install as root:

sudo -i
R CMD INSTALL /tmp/AnotherPackage_0.1.0.tar.gz



回答2:


I think you are running it as opencpu user, which means user installed packages are in /ocpu/user/{username}/library/{pkgname}/. See here how to get a root shell so that your package is in /ocpu/library/{pkgname}/ as you expected.



来源:https://stackoverflow.com/questions/50457691/opencpu-does-not-show-installed-packages

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!