Skip to content

Commit 0ad04d6

Browse files
authored
Merge pull request #22 from posit-dev/invalidate-cache-on-tinytex-release
Invalidate the TinyTeX install cache on new releases of TinyTeX
2 parents 62f97b0 + b0f2822 commit 0ad04d6

File tree

4 files changed

+31
-12
lines changed

4 files changed

+31
-12
lines changed

workbench/2024.12/Containerfile.ubuntu2204.std

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,6 @@ RUN \
6363
### Install Quarto to PATH ###
6464
RUN ln -s /lib/rstudio-server/bin/quarto/bin/quarto /usr/local/bin/quarto
6565

66-
### Install TinyTeX using Quarto ###
67-
RUN /lib/rstudio-server/bin/quarto/bin/quarto install tinytex --no-prompt --quiet --update-path
68-
6966
### Install R ###
7067
RUN RUN_UNATTENDED=1 R_VERSION=4.4.2 bash -c "$(curl -fsSL https://rstd.io/r-install)" && \
7168
find . -type f -name '[rR]-4.4.2.*\.(deb|rpm)' -delete
@@ -107,6 +104,13 @@ RUN mkdir -p /var/lib/rstudio-server/monitor/log \
107104
&& echo "RSPM=https://p3m.dev/cran/__linux__/jammy/latest" > /etc/rstudio/repos.conf \
108105
&& echo "CRAN=https://p3m.dev/cran/__linux__/jammy/latest" >> /etc/rstudio/repos.conf
109106

107+
### Install TinyTeX using Quarto ###
108+
# Caches won't invalidate correctly on new releases for TinyTeX installs. This ADD instruction is a workaround to bust
109+
# the cache on new releases.
110+
ADD https://api.github.com/repos/rstudio/tinytex-releases/releases/latest /tmp/tinytex-release.json
111+
RUN /lib/rstudio-server/bin/quarto/bin/quarto install tinytex --no-prompt --quiet --update-path \
112+
&& rm -f /tmp/tinytex-release.json
113+
110114
EXPOSE 8787/tcp
111115
EXPOSE 5559/tcp
112116
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]

workbench/2025.05/Containerfile.ubuntu2204.std

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,6 @@ RUN \
6363
### Install Quarto to PATH ###
6464
RUN ln -s /lib/rstudio-server/bin/quarto/bin/quarto /usr/local/bin/quarto
6565

66-
### Install TinyTeX using Quarto ###
67-
RUN /lib/rstudio-server/bin/quarto/bin/quarto install tinytex --no-prompt --quiet --update-path
68-
6966
### Install R ###
7067
RUN RUN_UNATTENDED=1 R_VERSION=4.4.3 bash -c "$(curl -fsSL https://rstd.io/r-install)" && \
7168
find . -type f -name '[rR]-4.4.3.*\.(deb|rpm)' -delete
@@ -107,6 +104,13 @@ RUN mkdir -p /var/lib/rstudio-server/monitor/log \
107104
&& echo "RSPM=https://p3m.dev/cran/__linux__/jammy/latest" > /etc/rstudio/repos.conf \
108105
&& echo "CRAN=https://p3m.dev/cran/__linux__/jammy/latest" >> /etc/rstudio/repos.conf
109106

107+
### Install TinyTeX using Quarto ###
108+
# Caches won't invalidate correctly on new releases for TinyTeX installs. This ADD instruction is a workaround to bust
109+
# the cache on new releases.
110+
ADD https://api.github.com/repos/rstudio/tinytex-releases/releases/latest /tmp/tinytex-release.json
111+
RUN /lib/rstudio-server/bin/quarto/bin/quarto install tinytex --no-prompt --quiet --update-path \
112+
&& rm -f /tmp/tinytex-release.json
113+
110114
EXPOSE 8787/tcp
111115
EXPOSE 5559/tcp
112116
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]

workbench/2025.09/Containerfile.ubuntu2204.std

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,6 @@ RUN \
6363
### Install Quarto to PATH ###
6464
RUN ln -s /lib/rstudio-server/bin/quarto/bin/quarto /usr/local/bin/quarto
6565

66-
### Install TinyTeX using Quarto ###
67-
RUN /lib/rstudio-server/bin/quarto/bin/quarto install tinytex --no-prompt --quiet --update-path
68-
6966
### Install R ###
7067
RUN RUN_UNATTENDED=1 R_VERSION=4.5.1 bash -c "$(curl -fsSL https://rstd.io/r-install)" && \
7168
find . -type f -name '[rR]-4.5.1.*\.(deb|rpm)' -delete
@@ -107,6 +104,13 @@ RUN mkdir -p /var/lib/rstudio-server/monitor/log \
107104
&& echo "RSPM=https://p3m.dev/cran/__linux__/jammy/latest" > /etc/rstudio/repos.conf \
108105
&& echo "CRAN=https://p3m.dev/cran/__linux__/jammy/latest" >> /etc/rstudio/repos.conf
109106

107+
### Install TinyTeX using Quarto ###
108+
# Caches won't invalidate correctly on new releases for TinyTeX installs. This ADD instruction is a workaround to bust
109+
# the cache on new releases.
110+
ADD https://api.github.com/repos/rstudio/tinytex-releases/releases/latest /tmp/tinytex-release.json
111+
RUN /lib/rstudio-server/bin/quarto/bin/quarto install tinytex --no-prompt --quiet --update-path \
112+
&& rm -f /tmp/tinytex-release.json
113+
110114
EXPOSE 8787/tcp
111115
EXPOSE 5559/tcp
112116
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]

workbench/template/Containerfile.ubuntu2204.jinja2

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,6 @@ RUN {% if Image.DownloadURL is defined %}DOWNLOAD_URL="{{ Image.DownloadURL }}"
6060
RUN ln -s /lib/rstudio-server/bin/quarto/bin/quarto /usr/local/bin/quarto
6161

6262
{% if not Image.Variant == "Minimal" -%}
63-
### Install TinyTeX using Quarto ###
64-
RUN {{ quarto.install_tinytex_command("/lib/rstudio-server/bin/quarto/bin/quarto", True) }}
65-
6663
### Install R ###
6764
{{ r.run_install(Dependencies.R) }}
6865

@@ -107,6 +104,16 @@ RUN mkdir -p /var/lib/rstudio-server/monitor/log \
107104
&& echo "RSPM={{ r.get_p3m_cran_repo(Image.OS) }}" > /etc/rstudio/repos.conf \
108105
&& echo "CRAN={{ r.get_p3m_cran_repo(Image.OS) }}" >> /etc/rstudio/repos.conf
109106
107+
{%- if Image.Variant != "Minimal" %}
108+
109+
### Install TinyTeX using Quarto ###
110+
# Caches won't invalidate correctly on new releases for TinyTeX installs. This ADD instruction is a workaround to bust
111+
# the cache on new releases.
112+
ADD https://api.github.com/repos/rstudio/tinytex-releases/releases/latest /tmp/tinytex-release.json
113+
RUN {{ quarto.install_tinytex_command("/lib/rstudio-server/bin/quarto/bin/quarto", True) }} \
114+
&& rm -f /tmp/tinytex-release.json
115+
{%- endif %}
116+
110117
EXPOSE 8787/tcp
111118
EXPOSE 5559/tcp
112119
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]

0 commit comments

Comments
 (0)