使用摇杆/诗歌和闪亮时安装beamer.cls

问题描述 投票:1回答:2

我是Docker的新手,也是TeX的用户。

我正在使用Dockerfile

FROM shrektan/shiny

MAINTAINER Steven

RUN R -e "install.packages(c('shiny', 'googleAuthR', 'dplyr', 'googleAnalyticsR', 'knitr', 'rmarkdown', 'jsonlite', 'scales', 'ggplot2', 'reshape2', 'Cairo'), repos = 'https://cran.rstudio.com/')"

COPY app /srv/shiny-server/

EXPOSE 3838

运行一个闪亮的应用程序,允许用户运行/下载beamer_presentation .pdf报告。

使用上面的Dockerfile,应用程序运行良好,所有功能都存在,但我收到一个错误,表明没有安装beamer.cls(我只包括相关部分):

[...]
processing file: GA_report.Rmd
`geom_smooth()` using method = 'loess' and formula 'y ~ x'
`geom_smooth()` using method = 'loess' and formula 'y ~ x'
`geom_smooth()` using method = 'loess' and formula 'y ~ x'
`geom_smooth()` using method = 'loess' and formula 'y ~ x' 
output file: GA_report.knit.md

tlmgr search --file --global '/beamer.cls'
tlmgr: Remote repository is newer than local (2017 < 2018)
Cross release updates are only supported with
update-tlmgr-latest(.sh/.exe) --update
Please see https://tug.org/texlive/upgrade.html for details.
Warning: running command ''tlmgr' search --file --global '/beamer.cls'' had 
status 1
! LaTeX Error: File `beamer.cls' not found.

! Emergency stop.
<read *> 

Warning: Error in : Failed to compile /tmp/RtmpmiHjqW/file185881070c.tex. See 
file185881070c.log for more info.
[No stack trace available]

我迷失了,试图找出如何将beamer.cls安装到这个docker镜像。

上面的docker文件由图像built from this Dockerfile组成,而rocker/verse Dockerfile here又是从rocker/verse Dockerfile构建的。

FAQ 8 here的顶部,作者明确指出他们正在使用TexLive的“虚拟”版本,并建议beamer.cls提供更多信息。 FAQ链接提供了如何安装包但不安装类的示例,即beamer.cls

虽然我是Docker的新手,但我不知道如何将RUN tlmgr install beamer translator 安装到我的Docker镜像上。我觉得在我提供的错误日志中有一些非常有用的东西,但有人可以指出我缺少的东西吗?

r docker shiny dockerfile beamer
2个回答
1
投票

原则上它应该足以添加

Dockerfile

到你的shrektan/shiny。不幸的是,这不能直接起作用,因为rocker/verse图像已经过几个月没有更新,并且仍在使用TexLive 2017(和R 3.4.4)。基本的workaround iamge同时使用TL 2018和R 3.5.1。虽然有可能shrektan/shiny“TL to old”问题,但我建议要求维护者重建Dockerfile,自己重建或在rocker/verse基于https://github.com/shrektan/rdocker在你自己的qazxswpoi中包含必要的部分。


1
投票

我是shrektan / shiny的作者。泊坞窗图像已存档,不再维护。该图像不包括LaTeX引擎,它可能是您出现问题的原因。

无论如何,你可以尝试摇滚/诗歌或我的新形象shrektan / rdocker4shinyserver(类似于摇滚/诗歌,但预先安装了更多的包.Github qazxswpoi)

这个图像包括Tinytex应该解决你的问题)。

© www.soinside.com 2019 - 2024. All rights reserved.