From 7463c945a17a5b8be9b6882bce78d605eab5628b Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Mon, 15 Jul 2024 10:42:40 -0600 Subject: [PATCH 1/5] Manage TinyTeX installation with Quarto Add CLI options to `install_quarto.sh` to install, update, add to path, or uninstall TinyTeX Add an option to use Workbench's preinstalled Quarto for TinyTeX management --- connect/Dockerfile.ubuntu2204 | 2 +- product/base/Dockerfile.ubuntu2204 | 8 -- product/base/scripts/ubuntu/install_quarto.sh | 77 +++++++++++++++++-- r-session-complete/Dockerfile.ubuntu2204 | 3 + .../Dockerfile.ubuntu2204 | 3 + .../Dockerfile.ubuntu2204 | 3 + workbench/Dockerfile.ubuntu2204 | 3 + 7 files changed, 82 insertions(+), 17 deletions(-) diff --git a/connect/Dockerfile.ubuntu2204 b/connect/Dockerfile.ubuntu2204 index 593fe1d3..d4d72986 100644 --- a/connect/Dockerfile.ubuntu2204 +++ b/connect/Dockerfile.ubuntu2204 @@ -12,7 +12,7 @@ ARG QUARTO_VERSION=1.4.557 ARG SCRIPTS_DIR=/opt/positscripts ### Install Quarto ### -RUN QUARTO_VERSION=${QUARTO_VERSION} ${SCRIPTS_DIR}/install_quarto.sh \ +RUN QUARTO_VERSION=${QUARTO_VERSION} ${SCRIPTS_DIR}/install_quarto.sh --install-tinytex --add-path-tinytex \ && ln -s /opt/quarto/${QUARTO_VERSION}/bin/quarto /usr/local/bin/quarto SHELL [ "/bin/bash", "-o", "pipefail", "-c"] diff --git a/product/base/Dockerfile.ubuntu2204 b/product/base/Dockerfile.ubuntu2204 index 649dabbf..c10a69ef 100644 --- a/product/base/Dockerfile.ubuntu2204 +++ b/product/base/Dockerfile.ubuntu2204 @@ -30,14 +30,6 @@ RUN gpg --batch --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 595E85A6B1 && chmod +x /tini \ && ln -s /tini /usr/local/bin/tini -### Install TinyTeX ### -SHELL ["/bin/bash", "-o", "pipefail", "-c"] -RUN curl -sL "https://yihui.org/tinytex/install-bin-unix.sh" | sh \ - && /root/.TinyTeX/bin/*/tlmgr path remove \ - && mv /root/.TinyTeX/ /opt/TinyTeX \ - && /opt/TinyTeX/bin/*/tlmgr option sys_bin /usr/local/bin \ - && /opt/TinyTeX/bin/*/tlmgr path add - ### Install R versions ### RUN R_VERSION=${R_VERSION} ${SCRIPTS_DIR}/install_r.sh \ && R_VERSION=${R_VERSION_ALT} ${SCRIPTS_DIR}/install_r.sh \ diff --git a/product/base/scripts/ubuntu/install_quarto.sh b/product/base/scripts/ubuntu/install_quarto.sh index e6071b13..051cb538 100755 --- a/product/base/scripts/ubuntu/install_quarto.sh +++ b/product/base/scripts/ubuntu/install_quarto.sh @@ -16,18 +16,30 @@ usage() { echo " QUARTO_VERSION=1.3.340 $0" echo "" echo "Options:" - echo " -d, --debug Enable debug output" - echo " -h, --help Print usage and exit" - echo " --prefix Install Quarto to a custom prefix" - echo " Each version of Quarto will have its own subdirectory" - echo " Default: /opt/quarto" + echo " -d, --debug Enable debug output" + echo " -h, --help Print usage and exit" + echo " --prefix Install Quarto to a custom prefix" + echo " Each version of Quarto will have its own subdirectory" + echo " Default: /opt/quarto" + echo " --use-workbench-quarto Use the Quarto version bundled in Workbench" + echo " --install-tinytex Install TinyTeX using Quarto" + echo " --add-path-tinytex Add TinyTeX to PATH using Quarto" + echo " --update-tinytex Update TinyTeX using Quarto" + echo " --uninstall-tinytex Uninstall TinyTeX from Quarto" + } # Set defaults PREFIX="/opt/quarto" +QUARTO_PATH="${PREFIX}/${QUARTO_VERSION}/bin/quarto" +ADD_PATH_TINYTEX=0 +INSTALL_TINYTEX=0 +UPDATE_TINYTEX=0 +UNINSTALL_TINYTEX=0 + -OPTIONS=$(getopt -o hdr: --long help,debug,prefix: -- "$@") +OPTIONS=$(getopt -o hdr: --long help,debug,prefix,use-workbench-quarto,install-tinytex,add-path-tinytex,update-tinytex: -- "$@") # shellcheck disable=SC2181 if [[ $? -ne 0 ]]; then exit 1; @@ -49,6 +61,26 @@ while true; do PREFIX="$2" shift 2 ;; + --use-workbench-quarto) + QUARTO_PATH="/lib/rstudio-server/bin/quarto/bin/quarto" + shift + ;; + --install-tinytex) + INSTALL_TINYTEX=1 + shift + ;; + --add-path-tinytex) + ADD_PATH_TINYTEX=1 + shift + ;; + --update-tinytex) + UPDATE_TINYTEX=1 + shift + ;; + --uninstall-tinytex) + UNINSTALL_TINYTEX=1 + shift + ;; --) shift; break ;; @@ -63,7 +95,7 @@ fi install_quarto() { # Check if Quarto is already installed # shellcheck disable=SC2086 - if ${PREFIX}/${QUARTO_VERSION}/bin/quarto --version | grep -qE "^${QUARTO_VERSION}" ; then + if $QUARTO_PATH --version | grep -qE "^${QUARTO_VERSION}" ; then echo "$d Quarto $QUARTO_VERSION is already installed in $PREFIX/$QUARTO_VERSION $d" return fi @@ -72,4 +104,33 @@ install_quarto() { wget -q -O - "https://github.com/quarto-dev/quarto-cli/releases/download/v${QUARTO_VERSION}/quarto-${QUARTO_VERSION}-linux-amd64.tar.gz" | tar xzf - -C "/opt/quarto/${QUARTO_VERSION}" --strip-components=1 } -install_quarto +update_tinytex() { + $QUARTO_PATH update tinytex --no-prompt +} + +uninstall_tinytex() { + $QUARTO_PATH uninstall tinytex --no-prompt +} + +install_tinytex() { + uninstall_tinytex + if [[ "$ADD_PATH_TINYTEX" -eq 1 ]]; then + $QUARTO_PATH install tinytex --update-path --no-prompt + else + $QUARTO_PATH install tinytex --no-prompt + fi +} + +if [[ "$QUARTO_PATH" != "/lib/rstudio-server/bin/quarto/bin/quarto" ]]; then + # Skip installation if Quarto is bundled with Workbench + install_quarto +fi +if [[ "$INSTALL_TINYTEX" -eq 1 ]]; then + install_tinytex +fi +if [[ "$UPDATE_TINYTEX" -eq 1 ]]; then + update_tinytex +fi +if [[ "$UNINSTALL_TINYTEX" -eq 1 ]]; then + uninstall_tinytex +fi diff --git a/r-session-complete/Dockerfile.ubuntu2204 b/r-session-complete/Dockerfile.ubuntu2204 index 8a608cc5..7dbe45c7 100644 --- a/r-session-complete/Dockerfile.ubuntu2204 +++ b/r-session-complete/Dockerfile.ubuntu2204 @@ -40,6 +40,9 @@ RUN apt-get update \ ### Install Quarto to PATH ### RUN ln -s /lib/rstudio-server/bin/quarto/bin/quarto /usr/local/bin/quarto +### Install TinyTeX using Quarto ### +RUN $SCRIPTS_DIR/install_quarto.sh --use-workbench-quarto --install-tinytex --add-path-tinytex + COPY maybe_install_vs_code.sh /tmp/maybe_install_vs_code.sh RUN /tmp/maybe_install_vs_code.sh \ && rm /tmp/maybe_install_vs_code.sh diff --git a/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 b/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 index 668557d1..428bc1ce 100644 --- a/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 +++ b/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 @@ -72,6 +72,9 @@ ENV LC_ALL en_US.UTF-8 ### Install Quarto to PATH ### RUN ln -s /lib/rstudio-server/bin/quarto/bin/quarto /usr/local/bin/quarto +### Install TinyTeX using Quarto ### +RUN $SCRIPTS_DIR/install_quarto.sh --use-workbench-quarto --install-tinytex --add-path-tinytex + ### Install Pro Drivers ### RUN ${SCRIPTS_DIR}/apt.sh --update upgrade \ && ${SCRIPTS_DIR}/apt.sh install unixodbc unixodbc-dev \ diff --git a/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 b/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 index 16a6b4fd..7d5156e8 100644 --- a/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 +++ b/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 @@ -68,6 +68,9 @@ RUN rm -f /etc/rstudio/launcher.pem /etc/rstudio/launcher.pub ### Install Quarto to PATH ### RUN ln -s /lib/rstudio-server/bin/quarto/bin/quarto /usr/local/bin/quarto +### Install TinyTeX using Quarto ### +RUN $SCRIPTS_DIR/install_quarto.sh --use-workbench-quarto --install-tinytex --add-path-tinytex + COPY --chmod=0755 license-manager-shim /opt/rstudio-license/license-manager COPY --chmod=0775 startup.sh /usr/local/bin/startup.sh COPY startup/* /startup/base/ diff --git a/workbench/Dockerfile.ubuntu2204 b/workbench/Dockerfile.ubuntu2204 index b3bebcb9..c17aee2b 100644 --- a/workbench/Dockerfile.ubuntu2204 +++ b/workbench/Dockerfile.ubuntu2204 @@ -70,6 +70,9 @@ RUN rm -f /etc/rstudio/launcher.pem /etc/rstudio/launcher.pub ### Install Quarto to PATH ### RUN ln -s /lib/rstudio-server/bin/quarto/bin/quarto /usr/local/bin/quarto +### Install TinyTeX using Quarto ### +RUN $SCRIPTS_DIR/install_quarto.sh --use-workbench-quarto --install-tinytex --add-path-tinytex + COPY maybe_install_vs_code.sh /tmp/maybe_install_vs_code.sh RUN /tmp/maybe_install_vs_code.sh \ && rm /tmp/maybe_install_vs_code.sh From a17b3b4e97e13c14a5c07674ff30e1c90f902344 Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Mon, 15 Jul 2024 12:30:36 -0600 Subject: [PATCH 2/5] Add TinyTeX test to Goss Fix usage error --- connect/test/goss.yaml | 7 +++++++ product/base/scripts/ubuntu/install_quarto.sh | 5 ++--- r-session-complete/test/goss.yaml | 7 +++++++ workbench-for-google-cloud-workstations/test/goss.yaml | 7 +++++++ workbench-for-microsoft-azure-ml/test/goss.yaml | 7 +++++++ workbench/test/goss.yaml | 7 +++++++ 6 files changed, 37 insertions(+), 3 deletions(-) diff --git a/connect/test/goss.yaml b/connect/test/goss.yaml index 88d87b2d..63cffa16 100644 --- a/connect/test/goss.yaml +++ b/connect/test/goss.yaml @@ -114,3 +114,10 @@ command: "/usr/local/bin/quarto check --quiet": title: quarto_check exit-status: 0 + +# Ensure TinyTeX is installed + "quarto list tools": + title: quarto_tinytex_installed + exit-status: 0 + stderr: + - "/tinytex\\s+Up to date\\s+v\\d{4}\\.\\d{2}\\.\\d{2}\\s+v\\d{4}\\.\\d{2}\\.\\d{2}/" diff --git a/product/base/scripts/ubuntu/install_quarto.sh b/product/base/scripts/ubuntu/install_quarto.sh index 051cb538..51f4ee6f 100755 --- a/product/base/scripts/ubuntu/install_quarto.sh +++ b/product/base/scripts/ubuntu/install_quarto.sh @@ -26,7 +26,6 @@ usage() { echo " --add-path-tinytex Add TinyTeX to PATH using Quarto" echo " --update-tinytex Update TinyTeX using Quarto" echo " --uninstall-tinytex Uninstall TinyTeX from Quarto" - } @@ -39,7 +38,7 @@ UPDATE_TINYTEX=0 UNINSTALL_TINYTEX=0 -OPTIONS=$(getopt -o hdr: --long help,debug,prefix,use-workbench-quarto,install-tinytex,add-path-tinytex,update-tinytex: -- "$@") +OPTIONS=$(getopt -o hdr: --long help,debug,prefix:,use-workbench-quarto,install-tinytex,add-path-tinytex,update-tinytex,uninstall-tinytex -- "$@") # shellcheck disable=SC2181 if [[ $? -ne 0 ]]; then exit 1; @@ -87,7 +86,7 @@ while true; do esac done -if [ -z "$QUARTO_VERSION" ]; then +if [ -z "$QUARTO_VERSION" ] && [[ "$QUARTO_PATH" != "/lib/rstudio-server/bin/quarto/bin/quarto" ]]; then usage exit 1 fi diff --git a/r-session-complete/test/goss.yaml b/r-session-complete/test/goss.yaml index 1c7bf336..44e611ec 100644 --- a/r-session-complete/test/goss.yaml +++ b/r-session-complete/test/goss.yaml @@ -60,3 +60,10 @@ command: "/usr/local/bin/quarto check --quiet": title: quarto_check exit-status: 0 + +# Ensure TinyTeX is installed + "quarto list tools": + title: quarto_tinytex_installed + exit-status: 0 + stderr: + - "/tinytex\\s+Up to date\\s+v\\d{4}\\.\\d{2}\\.\\d{2}\\s+v\\d{4}\\.\\d{2}\\.\\d{2}/" diff --git a/workbench-for-google-cloud-workstations/test/goss.yaml b/workbench-for-google-cloud-workstations/test/goss.yaml index a978ec25..547a503a 100644 --- a/workbench-for-google-cloud-workstations/test/goss.yaml +++ b/workbench-for-google-cloud-workstations/test/goss.yaml @@ -233,3 +233,10 @@ command: "/usr/local/bin/quarto check --quiet": title: quarto_check exit-status: 0 + +# Ensure TinyTeX is installed + "quarto list tools": + title: quarto_tinytex_installed + exit-status: 0 + stderr: + - "/tinytex\\s+Up to date\\s+v\\d{4}\\.\\d{2}\\.\\d{2}\\s+v\\d{4}\\.\\d{2}\\.\\d{2}/" diff --git a/workbench-for-microsoft-azure-ml/test/goss.yaml b/workbench-for-microsoft-azure-ml/test/goss.yaml index b94fae54..332ad325 100644 --- a/workbench-for-microsoft-azure-ml/test/goss.yaml +++ b/workbench-for-microsoft-azure-ml/test/goss.yaml @@ -151,3 +151,10 @@ command: "/usr/local/bin/quarto check --quiet": title: quarto_check exit-status: 0 + +# Ensure TinyTeX is installed + "quarto list tools": + title: quarto_tinytex_installed + exit-status: 0 + stderr: + - "/tinytex\\s+Up to date\\s+v\\d{4}\\.\\d{2}\\.\\d{2}\\s+v\\d{4}\\.\\d{2}\\.\\d{2}/" diff --git a/workbench/test/goss.yaml b/workbench/test/goss.yaml index bfbee8d0..a7a2beb2 100644 --- a/workbench/test/goss.yaml +++ b/workbench/test/goss.yaml @@ -148,3 +148,10 @@ command: "/usr/local/bin/quarto check --quiet": title: quarto_check exit-status: 0 + +# Ensure TinyTeX is installed + "quarto list tools": + title: quarto_tinytex_installed + exit-status: 0 + stderr: + - "/tinytex\\s+Up to date\\s+v\\d{4}\\.\\d{2}\\.\\d{2}\\s+v\\d{4}\\.\\d{2}\\.\\d{2}/" From d5ac71796c492cd9a10952688bda9719648c8f60 Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Tue, 16 Jul 2024 12:11:20 -0600 Subject: [PATCH 3/5] Auto-detect Workbench installed Quarto and use if present --- product/base/scripts/ubuntu/install_quarto.sh | 15 ++++++++------- r-session-complete/Dockerfile.ubuntu2204 | 2 +- .../Dockerfile.ubuntu2204 | 2 +- .../Dockerfile.ubuntu2204 | 2 +- workbench/Dockerfile.ubuntu2204 | 2 +- 5 files changed, 12 insertions(+), 11 deletions(-) diff --git a/product/base/scripts/ubuntu/install_quarto.sh b/product/base/scripts/ubuntu/install_quarto.sh index 51f4ee6f..cc829f27 100755 --- a/product/base/scripts/ubuntu/install_quarto.sh +++ b/product/base/scripts/ubuntu/install_quarto.sh @@ -21,7 +21,6 @@ usage() { echo " --prefix Install Quarto to a custom prefix" echo " Each version of Quarto will have its own subdirectory" echo " Default: /opt/quarto" - echo " --use-workbench-quarto Use the Quarto version bundled in Workbench" echo " --install-tinytex Install TinyTeX using Quarto" echo " --add-path-tinytex Add TinyTeX to PATH using Quarto" echo " --update-tinytex Update TinyTeX using Quarto" @@ -36,7 +35,13 @@ ADD_PATH_TINYTEX=0 INSTALL_TINYTEX=0 UPDATE_TINYTEX=0 UNINSTALL_TINYTEX=0 +IS_WORKBENCH_INSTALLATION=0 +# Set Quarto Path to the bundled version in Workbench if it exists +if [ -f "/lib/rstudio-server/bin/quarto/bin/quarto" ]; then + QUARTO_PATH="/lib/rstudio-server/bin/quarto/bin/quarto" + IS_WORKBENCH_INSTALLATION=1 +fi OPTIONS=$(getopt -o hdr: --long help,debug,prefix:,use-workbench-quarto,install-tinytex,add-path-tinytex,update-tinytex,uninstall-tinytex -- "$@") # shellcheck disable=SC2181 @@ -60,10 +65,6 @@ while true; do PREFIX="$2" shift 2 ;; - --use-workbench-quarto) - QUARTO_PATH="/lib/rstudio-server/bin/quarto/bin/quarto" - shift - ;; --install-tinytex) INSTALL_TINYTEX=1 shift @@ -86,7 +87,7 @@ while true; do esac done -if [ -z "$QUARTO_VERSION" ] && [[ "$QUARTO_PATH" != "/lib/rstudio-server/bin/quarto/bin/quarto" ]]; then +if [ -z "$QUARTO_VERSION" ] && [[ "$IS_WORKBENCH_INSTALLATION" -eq 0 ]]; then usage exit 1 fi @@ -120,7 +121,7 @@ install_tinytex() { fi } -if [[ "$QUARTO_PATH" != "/lib/rstudio-server/bin/quarto/bin/quarto" ]]; then +if [[ "$IS_WORKBENCH_INSTALLATION" -eq 0 ]]; then # Skip installation if Quarto is bundled with Workbench install_quarto fi diff --git a/r-session-complete/Dockerfile.ubuntu2204 b/r-session-complete/Dockerfile.ubuntu2204 index 7dbe45c7..ec3a8658 100644 --- a/r-session-complete/Dockerfile.ubuntu2204 +++ b/r-session-complete/Dockerfile.ubuntu2204 @@ -41,7 +41,7 @@ RUN apt-get update \ RUN ln -s /lib/rstudio-server/bin/quarto/bin/quarto /usr/local/bin/quarto ### Install TinyTeX using Quarto ### -RUN $SCRIPTS_DIR/install_quarto.sh --use-workbench-quarto --install-tinytex --add-path-tinytex +RUN $SCRIPTS_DIR/install_quarto.sh --install-tinytex --add-path-tinytex COPY maybe_install_vs_code.sh /tmp/maybe_install_vs_code.sh RUN /tmp/maybe_install_vs_code.sh \ diff --git a/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 b/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 index 428bc1ce..6ec4bc85 100644 --- a/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 +++ b/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 @@ -73,7 +73,7 @@ ENV LC_ALL en_US.UTF-8 RUN ln -s /lib/rstudio-server/bin/quarto/bin/quarto /usr/local/bin/quarto ### Install TinyTeX using Quarto ### -RUN $SCRIPTS_DIR/install_quarto.sh --use-workbench-quarto --install-tinytex --add-path-tinytex +RUN $SCRIPTS_DIR/install_quarto.sh --install-tinytex --add-path-tinytex ### Install Pro Drivers ### RUN ${SCRIPTS_DIR}/apt.sh --update upgrade \ diff --git a/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 b/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 index 7d5156e8..bcb6139d 100644 --- a/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 +++ b/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 @@ -69,7 +69,7 @@ RUN rm -f /etc/rstudio/launcher.pem /etc/rstudio/launcher.pub RUN ln -s /lib/rstudio-server/bin/quarto/bin/quarto /usr/local/bin/quarto ### Install TinyTeX using Quarto ### -RUN $SCRIPTS_DIR/install_quarto.sh --use-workbench-quarto --install-tinytex --add-path-tinytex +RUN $SCRIPTS_DIR/install_quarto.sh --install-tinytex --add-path-tinytex COPY --chmod=0755 license-manager-shim /opt/rstudio-license/license-manager COPY --chmod=0775 startup.sh /usr/local/bin/startup.sh diff --git a/workbench/Dockerfile.ubuntu2204 b/workbench/Dockerfile.ubuntu2204 index c17aee2b..c6d0cb1f 100644 --- a/workbench/Dockerfile.ubuntu2204 +++ b/workbench/Dockerfile.ubuntu2204 @@ -71,7 +71,7 @@ RUN rm -f /etc/rstudio/launcher.pem /etc/rstudio/launcher.pub RUN ln -s /lib/rstudio-server/bin/quarto/bin/quarto /usr/local/bin/quarto ### Install TinyTeX using Quarto ### -RUN $SCRIPTS_DIR/install_quarto.sh --use-workbench-quarto --install-tinytex --add-path-tinytex +RUN $SCRIPTS_DIR/install_quarto.sh --install-tinytex --add-path-tinytex COPY maybe_install_vs_code.sh /tmp/maybe_install_vs_code.sh RUN /tmp/maybe_install_vs_code.sh \ From d1f104e61cff911f39fa69b23d56a556d08b220c Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Mon, 22 Jul 2024 07:41:38 -0700 Subject: [PATCH 4/5] Update product/base/scripts/ubuntu/install_quarto.sh Co-authored-by: Benjamin R. J. Schwedler --- product/base/scripts/ubuntu/install_quarto.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/product/base/scripts/ubuntu/install_quarto.sh b/product/base/scripts/ubuntu/install_quarto.sh index cc829f27..632eebf3 100755 --- a/product/base/scripts/ubuntu/install_quarto.sh +++ b/product/base/scripts/ubuntu/install_quarto.sh @@ -43,7 +43,7 @@ if [ -f "/lib/rstudio-server/bin/quarto/bin/quarto" ]; then IS_WORKBENCH_INSTALLATION=1 fi -OPTIONS=$(getopt -o hdr: --long help,debug,prefix:,use-workbench-quarto,install-tinytex,add-path-tinytex,update-tinytex,uninstall-tinytex -- "$@") +OPTIONS=$(getopt -o hd --long help,debug,prefix:,install-tinytex,add-path-tinytex,update-tinytex,uninstall-tinytex -- "$@") # shellcheck disable=SC2181 if [[ $? -ne 0 ]]; then exit 1; From 1346b9eeefb10127d6b3cf9f262f29b41e27230c Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Mon, 22 Jul 2024 09:02:01 -0600 Subject: [PATCH 5/5] Move Quarto and TinyTeX install to after workbench install in WGCW --- .../Dockerfile.ubuntu2204 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 b/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 index 6ec4bc85..324371c9 100644 --- a/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 +++ b/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 @@ -69,12 +69,6 @@ ENV LANG en_US.UTF-8 ENV LANGUAGE en_US:en ENV LC_ALL en_US.UTF-8 -### Install Quarto to PATH ### -RUN ln -s /lib/rstudio-server/bin/quarto/bin/quarto /usr/local/bin/quarto - -### Install TinyTeX using Quarto ### -RUN $SCRIPTS_DIR/install_quarto.sh --install-tinytex --add-path-tinytex - ### Install Pro Drivers ### RUN ${SCRIPTS_DIR}/apt.sh --update upgrade \ && ${SCRIPTS_DIR}/apt.sh install unixodbc unixodbc-dev \ @@ -102,6 +96,12 @@ RUN curl -o rstudio-workbench.deb "${RSW_DOWNLOAD_URL}/${RSW_NAME}-${RSW_VERSION && rm -rf /var/lib/apt/lists/* \ && rm -rf /var/lib/rstudio-server/r-versions +### Install Quarto to PATH ### +RUN ln -s /lib/rstudio-server/bin/quarto/bin/quarto /usr/local/bin/quarto + +### Install TinyTeX using Quarto ### +RUN $SCRIPTS_DIR/install_quarto.sh --install-tinytex --add-path-tinytex + # Workaround to ensure no pre-generated certificates are included in image distributions. # This happens in the step immediately following Workbench installation in case the certificates are generated. RUN rm -f /etc/rstudio/launcher.pem /etc/rstudio/launcher.pub