Search code examples
rdockerpackageopencpu

opencpu does not show installed packages


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). enter image description here

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


Solution

  • 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