Skip to content

Commit 805b4a7

Browse files
authored
install apt-get texlive-xelatex and pkgs (#92)
1 parent d947d42 commit 805b4a7

File tree

2 files changed

+29
-27
lines changed

2 files changed

+29
-27
lines changed

transitionmonitor_docker/Dockerfile

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,32 @@ RUN apt-get update \
4242
&& rm -rf /var/lib/apt/lists/*
4343

4444
# install TeX system and fonts
45-
ARG TEX_APT="\
46-
texlive-xetex \
47-
texlive-fonts-recommended \
48-
texlive-fonts-extra \
49-
lmodern \
50-
"
51-
RUN apt-get update \
52-
&& apt-get install -y --no-install-recommends $TEX_APT \
53-
&& tlmgr init-usertree \
54-
&& rm -rf /var/lib/apt/lists/*
45+
ARG TEX_APT="\
46+
texlive-xetex \
47+
texlive-fonts-recommended \
48+
texlive-fonts-extra \
49+
lmodern \
50+
"
51+
RUN apt-get update \
52+
&& apt-get install -y --no-install-recommends $TEX_APT \
53+
&& tlmgr init-usertree \
54+
&& rm -rf /var/lib/apt/lists/*
55+
56+
# install tex package dependencies
57+
ARG CTAN_REPO=https://www.texlive.info/tlnet-archive/2019/12/31/tlnet/
58+
59+
ARG TEX_DEPS="\
60+
geometry \
61+
hyperref \
62+
l3packages \
63+
mdframed \
64+
needspace \
65+
tools \
66+
xcolor \
67+
zref \
68+
"
69+
70+
RUN tlmgr --repository $CTAN_REPO install $TEX_DEPS
5571

5672
# install R package dependencies
5773
ARG PKG_DEPS="\
@@ -81,22 +97,6 @@ RUN Rscript -e "\
8197
remotes::install_cran(pkg_deps); \
8298
"
8399

84-
# install {tinytex} and TeX packages
85-
ARG TEX_DEPS="\
86-
geometry \
87-
mdframed \
88-
multicol \
89-
needspace \
90-
xcolor \
91-
xparse \
92-
zref \
93-
"
94-
RUN Rscript -e "\
95-
tex_deps <- strsplit(trimws(gsub('[\\\]+', '', '$TEX_DEPS')), '[[:space:]]+')[[1]]; \
96-
remotes::install_cran('tinytex'); \
97-
tinytex::install_tinytex(extra_packages = tex_deps); \
98-
"
99-
100100
# copy in PACTA repos
101101
COPY pacta-data /pacta-data
102102
COPY pacta.executive.summary /pacta.executive.summary

transitionmonitor_docker/build_with_tag.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ green () {
5656
}
5757

5858
dir_start="$(pwd)"
59-
dir_temp="$(mktemp -d)"
59+
dir_temp="$(mktemp -d -p /datadrive/tmp)"
6060
cleanup () {
6161
rm -rf $dir_temp
6262
cd $dir_start
@@ -164,6 +164,8 @@ cp "${dir_start}/Dockerfile" "$dir_temp"
164164
# Maybe copy in custom data path
165165
# FIXME: this should be handled better
166166
if [ -n "${datapath}" ]; then
167+
yellow " $datapath"
168+
yellow " $dir_temp"
167169
mkdir "${dir_temp}/pacta-data"
168170
cp -r "${datapath}" "${dir_temp}/pacta-data"
169171
fi

0 commit comments

Comments
 (0)