问题
Let me confess first I am new to Docker / opencpu world. here is the issue.
- I installed Docker from opencpu site on my windows 10 box.
- I was able to successfully run the docker by "docker run --name myDocker -t -p 80:80 -p 8004:8004 opencpu/rstudio".
- I successfully installed my R package by "R CMD INSTALL /tmp/AnotherPackage_0.1.0.tar.gz".
- 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