rocker-org / rocker-versioned

Run current & prior versions of R using docker
https://hub.docker.com/r/rocker/r-ver
GNU General Public License v2.0
297 stars 169 forks source link

Run `tinytex::install_tinytex()` #172

Closed annakrystalli closed 2 years ago

annakrystalli commented 4 years ago

Just a heads up that, I could only get full bookdown functionality (ie ability to install additional LaTeX packages and rerender an Rmd manuscript to pdf) in this binderised research compendium using the rocker/binder image if I added the command tinytex::install_tinytex() to my Dockerfile made with holepunch. Prior to that, kniting analysis/paper/paper.Rmd would fail.

I'm not sure if rocker-org/rocker-versioned is trying to achieve this but given that so much effort goes into installing tinytex, it would be nice if the installation step within the package is also run when initializing the container.

cboettig commented 4 years ago

Hi @annakrystalli , thanks for the bug report! I'm guessing this has something to do with $NB_USER maybe not being in the staff group or some related permission problem?

tinytex is installed system-wide in the verse image (from which binder images inherit), users in staff group should then be able to write (e.g. install to) /opt/TinyTex, just like they can install system-wide R packages to /usr/local/R/site.library by being a member of staff... It looks like your Dockerfile re-installs tinytex as NB_USER, so it puts a copy in the user's home dir, which of course should work but like you say shouldn't be necessary. Will need to do some actual splunking to confirm...

annakrystalli commented 4 years ago

Aha! That makes sense. So do you think this is something handled best at the holepunch Dockerfile template level then?

BTW, when you say:

tinytex is installed system-wide in the verse image (from which binder images inherit),

do you mean tinytex, the package, is installed or the function tinytex::install_tinytex() is run?

eitsupi commented 2 years ago

I think this issue has been resolved, so I will close it.