From 4bef13545b9ccee9748ef0aad22b8f7cbe6ab476 Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Fri, 19 Apr 2024 13:56:29 -0700 Subject: [PATCH] Move Quarto installation/configuration to downstream images (#727) * Fix/exclude goss tests for buildx bake * Implement separate test for Connect * Implement bake preview builds * Provision buildx in preview * Do not cache or output tests for preview Provide a buildx config for GHA Unify test sleep behavior of Workbench images * Remove test targets * Remove test layers from Dockerfiles * Change test running to be orchestrated by a Python script * Update preview builds for new test script * Create common use scripts in base image for Ubuntu 22.04 images * Create common use scripts in base image for CentOS 7 images * Move deps to subdirectory Fix hadolint issues * Ignore hadolint issue * Remove build.justfile * Remove unnecessary buildx setup from build-bake-preview.yaml * Move Quarto installation downstream Upgrade Connect and WGCW to 1.4.552 Pin remaining products back to 1.3.340 or lower * Add SCRIPTS_DIR to downstream Dockerfiles * Leave original Quarto install for WGCW * Fix hardcoded QUARTO_VERSION in rstudio-connect.gcfg * Remove unnecessary Quarto tests from base-pro tests * Symlink bundled Quarto for Workbench installations * Fix quarto config replacement in Connect * Remove QUARTO_VERSION arg from base in bake definition * Add quarto check command to Connect goss tests * Remove Quarto build arg from Workbench and r-session-complete * Update preview Connect build matrix with Quarto version * Remove Quarto install from CentOS 7 r-session-complete * Remove package check for Quarto in WGCW * Use DEFAULT_QUARTO_VERSION for Connect matrix * Use DEFAULT_QUARTO_VERSION for Connect matrix * Revert Quarto to 1.3.340 for Connect --- connect/Dockerfile.ubuntu2204 | 13 ++- connect/rstudio-connect-float.gcfg | 7 +- connect/rstudio-connect.gcfg | 2 +- connect/test/goss.yaml | 27 ++++++ content/docker-bake.hcl | 82 ------------------- docker-bake.hcl | 12 ++- docker-bake.preview.hcl | 5 +- product/base/Dockerfile.centos7 | 5 -- product/base/Dockerfile.ubuntu2204 | 4 - product/base/test/goss.yaml | 10 --- product/pro/test/goss.yaml | 10 --- r-session-complete/Dockerfile.centos7 | 4 + r-session-complete/Dockerfile.ubuntu2204 | 4 + r-session-complete/test/goss.yaml | 12 ++- .../Dockerfile.ubuntu2004 | 10 +-- .../test/goss.yaml | 14 ++-- .../Dockerfile.ubuntu2204 | 5 +- .../test/goss.yaml | 8 ++ workbench/Dockerfile.ubuntu2204 | 4 + workbench/test/goss.yaml | 8 ++ 20 files changed, 108 insertions(+), 138 deletions(-) delete mode 100644 content/docker-bake.hcl diff --git a/connect/Dockerfile.ubuntu2204 b/connect/Dockerfile.ubuntu2204 index 39c0105b..0aff7034 100644 --- a/connect/Dockerfile.ubuntu2204 +++ b/connect/Dockerfile.ubuntu2204 @@ -8,6 +8,14 @@ ARG R_VERSION_ALT=4.1.3 ARG PYTHON_VERSION=3.9.17 ARG PYTHON_VERSION_ALT=3.8.17 ARG RSC_VERSION=2024.03.0 +ARG QUARTO_VERSION=1.3.340 +ARG SCRIPTS_DIR=/opt/positscripts + +### Install Quarto ### +RUN QUARTO_VERSION=${QUARTO_VERSION} ${SCRIPTS_DIR}/install_quarto.sh \ + && ln -s /opt/quarto/${QUARTO_VERSION}/bin/quarto /usr/local/bin/quarto + +### Install Connect and additional dependencies ### SHELL [ "/bin/bash", "-o", "pipefail", "-c"] RUN apt-get update --fix-missing \ && apt-get install -yq --no-install-recommends \ @@ -27,13 +35,16 @@ RUN apt-get update --fix-missing \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* + +### Configure Connect ### EXPOSE 3939/tcp ENV RSC_LICENSE "" ENV RSC_LICENSE_SERVER "" ENV STARTUP_DEBUG_MODE 0 COPY rstudio-connect.gcfg /etc/rstudio-connect/rstudio-connect.gcfg RUN sed -i "s/{{PYTHON_VERSION}}/${PYTHON_VERSION}/g" /etc/rstudio-connect/rstudio-connect.gcfg \ - && sed -i "s/{{PYTHON_VERSION_ALT}}/${PYTHON_VERSION_ALT}/g" /etc/rstudio-connect/rstudio-connect.gcfg + && sed -i "s/{{PYTHON_VERSION_ALT}}/${PYTHON_VERSION_ALT}/g" /etc/rstudio-connect/rstudio-connect.gcfg \ + && sed -i "s/{{QUARTO_VERSION}}/${QUARTO_VERSION}/g" /etc/rstudio-connect/rstudio-connect.gcfg VOLUME ["/data"] ENTRYPOINT ["tini", "--"] diff --git a/connect/rstudio-connect-float.gcfg b/connect/rstudio-connect-float.gcfg index a3d797c4..df12fe67 100644 --- a/connect/rstudio-connect-float.gcfg +++ b/connect/rstudio-connect-float.gcfg @@ -34,7 +34,12 @@ Provider = password [Python] Enabled = true -Executable = /opt/python/3.6.5/bin/python +Executable = /opt/python/{{PYTHON_VERSION}}/bin/python +Executable = /opt/python/{{PYTHON_VERSION_ALT}}/bin/python + +[Quarto] +Enabled = true +Executable = /opt/quarto/{{QUARTO_VERSION}}/bin/quarto ;[RPackageRepository "CRAN"] ;URL = https://demo.rstudiopm.com/all/__linux__/jammy/latest diff --git a/connect/rstudio-connect.gcfg b/connect/rstudio-connect.gcfg index 376d08c2..0cf5006d 100644 --- a/connect/rstudio-connect.gcfg +++ b/connect/rstudio-connect.gcfg @@ -35,7 +35,7 @@ Executable = /opt/python/{{PYTHON_VERSION_ALT}}/bin/python [Quarto] Enabled = true -Executable = /opt/quarto/1.3.340/bin/quarto +Executable = /opt/quarto/{{QUARTO_VERSION}}/bin/quarto [RPackageRepository "CRAN"] URL = https://packagemanager.rstudio.com/cran/__linux__/jammy/latest diff --git a/connect/test/goss.yaml b/connect/test/goss.yaml index 57ffaee8..88d87b2d 100644 --- a/connect/test/goss.yaml +++ b/connect/test/goss.yaml @@ -44,6 +44,11 @@ file: exists: true /opt/python/{{.Env.PYTHON_VERSION_ALT}}/bin/python: exists: true + /opt/quarto/{{.Env.QUARTO_VERSION}}/bin/quarto: + exists: true + /usr/local/bin/quarto: + exists: true + filetype: symlink /tmp/startup.log: exists: true contents: @@ -87,3 +92,25 @@ command: stdout: [ "{{ .Env.PYTHON_VERSION_ALT }}" ] + +# Ensure correct Quarto version + "/opt/quarto/{{ .Env.QUARTO_VERSION }}/bin/quarto --version": + title: quarto_version_matches + exit-status: 0 + stdout: [ + "{{ .Env.QUARTO_VERSION }}" + ] + "/usr/local/bin/quarto --version": + title: quarto_symlink_version_matches + exit-status: 0 + stdout: [ + "{{ .Env.QUARTO_VERSION }}" + ] + +# Ensure Quarto works + "/opt/quarto/{{ .Env.QUARTO_VERSION }}/bin/quarto check --quiet": + title: quarto_check + exit-status: 0 + "/usr/local/bin/quarto check --quiet": + title: quarto_check + exit-status: 0 diff --git a/content/docker-bake.hcl b/content/docker-bake.hcl deleted file mode 100644 index 3205ca24..00000000 --- a/content/docker-bake.hcl +++ /dev/null @@ -1,82 +0,0 @@ -variable CONTENT_BUILD_MATRIX { - default = { - builds = [ - {os = "ubuntu1804", os_alt = "bionic", r = "3.1.3", py = "2.7.18", drivers = "2024.03.0", quarto = "1.0.37"}, - {os = "ubuntu1804", os_alt = "bionic", r = "3.2.5", py = "2.7.18", drivers = "2024.03.0", quarto = "1.0.37"}, - {os = "ubuntu1804", os_alt = "bionic", r = "3.3.3", py = "3.6.13", drivers = "2024.03.0", quarto = "1.0.37"}, - {os = "ubuntu1804", os_alt = "bionic", r = "3.4.4", py = "3.6.13", drivers = "2024.03.0", quarto = "1.0.37"}, - {os = "ubuntu1804", os_alt = "bionic", r = "3.4.4", py = "3.7.10", drivers = "2024.03.0", quarto = "1.0.37"}, - {os = "ubuntu1804", os_alt = "bionic", r = "3.5.3", py = "2.7.18", drivers = "2024.03.0", quarto = "1.0.37"}, - {os = "ubuntu1804", os_alt = "bionic", r = "3.5.3", py = "3.7.10", drivers = "2024.03.0", quarto = "1.0.37"}, - {os = "ubuntu1804", os_alt = "bionic", r = "3.6.3", py = "2.7.18", drivers = "2024.03.0", quarto = "1.0.37"}, - {os = "ubuntu1804", os_alt = "bionic", r = "3.6.3", py = "3.6.13", drivers = "2024.03.0", quarto = "1.0.37"}, - {os = "ubuntu1804", os_alt = "bionic", r = "3.6.3", py = "3.8.8", drivers = "2024.03.0", quarto = "1.0.37"}, - {os = "ubuntu1804", os_alt = "bionic", r = "4.0.5", py = "3.6.13", drivers = "2024.03.0", quarto = "1.0.37"}, - {os = "ubuntu1804", os_alt = "bionic", r = "4.0.5", py = "3.7.10", drivers = "2024.03.0", quarto = "1.0.37"}, - {os = "ubuntu1804", os_alt = "bionic", r = "4.0.5", py = "3.8.8", drivers = "2024.03.0", quarto = "1.0.37"}, - {os = "ubuntu1804", os_alt = "bionic", r = "4.0.5", py = "3.9.2", drivers = "2024.03.0", quarto = "1.0.37"}, - {os = "ubuntu1804", os_alt = "bionic", r = "4.1.0", py = "3.8.8", drivers = "2024.03.0", quarto = "1.0.37"}, - {os = "ubuntu1804", os_alt = "bionic", r = "4.1.0", py = "3.9.2", drivers = "2024.03.0", quarto = "1.0.37"}, - {os = "ubuntu1804", os_alt = "bionic", r = "4.1.3", py = "3.10.4", drivers = "2024.03.0", quarto = "1.0.37"}, - {os = "ubuntu2204", os_alt = "jammy", r = "3.6.3", py = "3.8.16", drivers = "2024.03.0", quarto = "1.3.340"}, - {os = "ubuntu2204", os_alt = "jammy", r = "4.0.5", py = "3.9.16", drivers = "2024.03.0", quarto = "1.3.340"}, - {os = "ubuntu2204", os_alt = "jammy", r = "4.1.3", py = "3.10.11", drivers = "2024.03.0", quarto = "1.3.340"}, - {os = "ubuntu2204", os_alt = "jammy", r = "4.2.2", py = "3.11.3", drivers = "2024.03.0", quarto = "1.3.340"}, - ] - } -} - -group "default" { - targets = ["base", "pro"] -} - -target "base" { - name = "content-base-r${replace(builds.r, ".", "-")}-py${replace(builds.py, ".", "-")}-${builds.os}" - - tags = [ - "ghcr.io/rstudio/content-base:r${builds.r}-py${builds.py}-${builds.os}", - "ghcr.io/rstudio/content-base:r${builds.r}-py${builds.py}-${builds.os_alt}", - "docker.io/rstudio/content-base:r${builds.r}-py${builds.py}-${builds.os}", - "docker.io.io/rstudio/content-base:r${builds.r}-py${builds.py}-${builds.os_alt}", - ] - output = [ - "type=image", - ] - - dockerfile = "Dockerfile.${builds.os}" - context = "base" - - matrix = CONTENT_BUILD_MATRIX - args = { - R_VERSION = "${builds.r}" - PYTHON_VERSION = "${builds.py}" - QUARTO_VERSION = "${builds.quarto}" - } -} - -target "pro" { - name = "content-pro-r${replace(builds.r, ".", "-")}-py${replace(builds.py, ".", "-")}-${builds.os}" - - tags = [ - "ghcr.io/rstudio/content-pro:r${builds.r}-py${builds.py}-${builds.os}", - "ghcr.io/rstudio/content-pro:r${builds.r}-py${builds.py}-${builds.os_alt}", - "docker.io/rstudio/content-pro:r${builds.r}-py${builds.py}-${builds.os}", - "docker.io.io/rstudio/content-pro:r${builds.r}-py${builds.py}-${builds.os_alt}", - ] - output = [ - "type=image", - ] - - contexts = { - content-base = "target:content-base-r${replace(builds.r, ".", "-")}-py${replace(builds.py, ".", "-")}-${builds.os}" - } - - dockerfile = "Dockerfile.${builds.os}" - context = "pro" - - matrix = CONTENT_BUILD_MATRIX - args = { - R_VERSION = "${builds.r}" - DRIVERS_VERSION = "${builds.drivers}" - } -} diff --git a/docker-bake.hcl b/docker-bake.hcl index 6bd1d696..ee996e3c 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -1,6 +1,6 @@ ### Variable definitions ### variable CONNECT_VERSION { - default = "2024.02.0" + default = "2024.03.0" } variable PACKAGE_MANAGER_VERSION { @@ -16,7 +16,7 @@ variable DRIVERS_VERSION { } variable DEFAULT_QUARTO_VERSION { - default = "1.4.553" + default = "1.4.552" } variable DEFAULT_JUPYTERLAB_VERSION { @@ -101,7 +101,7 @@ variable PACKAGE_MANAGER_BUILD_MATRIX { variable CONNECT_BUILD_MATRIX { default = { builds = [ - {os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.9.17", py_alternate = "3.8.17"}, + {os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.9.17", py_alternate = "3.8.17", quarto = "1.3.340"}, ] } } @@ -240,7 +240,6 @@ target "product-base" { PYTHON_VERSION = builds.py_primary PYTHON_VERSION_ALT = builds.py_alternate TINI_VERSION = "0.19.0" - QUARTO_VERSION = "1.3.340" } } @@ -268,8 +267,7 @@ target "product-base-pro" { PYTHON_VERSION_ALT = builds.py_alternate DRIVERS_VERSION = get_drivers_version(builds.os) TINI_VERSION = "0.19.0" - QUARTO_VERSION = "1.3.340" - } + } } ### Package Manager targets ### @@ -317,6 +315,7 @@ target "connect" { PYTHON_VERSION = builds.py_primary PYTHON_VERSION_ALT = builds.py_alternate RSC_VERSION = CONNECT_VERSION + QUARTO_VERSION = builds.quarto } } @@ -472,7 +471,6 @@ target "workbench-for-google-cloud-workstations" { } ### Workbench for Microsoft Azure ML targets ### - target "build-workbench-for-microsoft-azure-ml" { inherits = ["base"] target = "build" diff --git a/docker-bake.preview.hcl b/docker-bake.preview.hcl index 171c0287..60694444 100644 --- a/docker-bake.preview.hcl +++ b/docker-bake.preview.hcl @@ -24,7 +24,7 @@ variable DRIVERS_VERSION { } variable DEFAULT_QUARTO_VERSION { - default = "1.4.553" + default = "1.4.552" } variable DEFAULT_JUPYTERLAB_VERSION { @@ -126,7 +126,7 @@ variable PACKAGE_MANAGER_BUILD_MATRIX { variable CONNECT_BUILD_MATRIX { default = { builds = [ - {os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.11.9", py_alternate = "3.10.14"}, + {os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.11.9", py_alternate = "3.10.14", quarto = "1.3.340"}, ] } } @@ -297,6 +297,7 @@ target "connect-daily" { PYTHON_VERSION = builds.py_primary PYTHON_VERSION_ALT = builds.py_alternate RSC_VERSION = CONNECT_DAILY_VERSION + QUARTO_VERSION = builds.quarto } } diff --git a/product/base/Dockerfile.centos7 b/product/base/Dockerfile.centos7 index 5e667f12..9faf3e6b 100644 --- a/product/base/Dockerfile.centos7 +++ b/product/base/Dockerfile.centos7 @@ -7,7 +7,6 @@ ARG PYTHON_VERSION=3.9.14 ARG PYTHON_VERSION_ALT=3.8.15 ARG TINI_VERSION=0.19.0 ARG QUARTO_VERSION=1.3.340 - ARG SCRIPTS_DIR=/opt/positscripts COPY --chmod=0755 scripts/rhel/* ${SCRIPTS_DIR}/ @@ -36,10 +35,6 @@ RUN curl -sL "https://yihui.org/tinytex/install-bin-unix.sh" | sh \ && /opt/TinyTeX/bin/*/tlmgr option sys_bin /usr/local/bin \ && /opt/TinyTeX/bin/*/tlmgr path add -### Install Quarto ### -RUN QUARTO_VERSION=${QUARTO_VERSION} ${SCRIPTS_DIR}/install_quarto.sh \ - && ln -s /opt/quarto/${QUARTO_VERSION}/bin/quarto /usr/local/bin/quarto - ### 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/Dockerfile.ubuntu2204 b/product/base/Dockerfile.ubuntu2204 index 93c0b1bf..850245e8 100644 --- a/product/base/Dockerfile.ubuntu2204 +++ b/product/base/Dockerfile.ubuntu2204 @@ -38,10 +38,6 @@ RUN curl -sL "https://yihui.org/tinytex/install-bin-unix.sh" | sh \ && /opt/TinyTeX/bin/*/tlmgr option sys_bin /usr/local/bin \ && /opt/TinyTeX/bin/*/tlmgr path add -### Install Quarto ### -RUN QUARTO_VERSION=${QUARTO_VERSION} ${SCRIPTS_DIR}/install_quarto.sh \ - && ln -s /opt/quarto/${QUARTO_VERSION}/bin/quarto /usr/local/bin/quarto - ### 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/test/goss.yaml b/product/base/test/goss.yaml index e321ebe0..d15aa828 100644 --- a/product/base/test/goss.yaml +++ b/product/base/test/goss.yaml @@ -47,8 +47,6 @@ file: exists: true /tini: exists: true - /opt/quarto/{{.Env.QUARTO_VERSION}}/bin/quarto: - exists: true {{if .Env.OS | regexMatch "ubuntu.*"}} # Check that `cracklib-runtime` is present so `chpasswd` works /var/cache/cracklib/cracklib_dict.pwd: @@ -83,11 +81,3 @@ command: stdout: [ "{{ .Env.PYTHON_VERSION_ALT }}" ] - -# Ensure correct Quarto version - "/opt/quarto/{{ .Env.QUARTO_VERSION }}/bin/quarto --version": - title: quarto_version_matches - exit-status: 0 - stdout: [ - "{{ .Env.QUARTO_VERSION }}" - ] diff --git a/product/pro/test/goss.yaml b/product/pro/test/goss.yaml index 8670095d..e602a7ac 100644 --- a/product/pro/test/goss.yaml +++ b/product/pro/test/goss.yaml @@ -40,8 +40,6 @@ file: exists: true /tini: exists: true - /opt/quarto/{{.Env.QUARTO_VERSION}}/bin/quarto: - exists: true command: @@ -72,11 +70,3 @@ command: stdout: [ "{{ .Env.PYTHON_VERSION_ALT }}" ] - -# Ensure correct Quarto version - "/opt/quarto/{{ .Env.QUARTO_VERSION }}/bin/quarto --version": - title: quarto_version_matches - exit-status: 0 - stdout: [ - "{{ .Env.QUARTO_VERSION }}" - ] diff --git a/r-session-complete/Dockerfile.centos7 b/r-session-complete/Dockerfile.centos7 index 6bb34d88..5a8e0a7c 100644 --- a/r-session-complete/Dockerfile.centos7 +++ b/r-session-complete/Dockerfile.centos7 @@ -8,6 +8,7 @@ ARG JUPYTERLAB_VERSION=3.6.7 ARG RSW_VERSION=2023.12.1+402.pro1 ARG RSW_NAME=rstudio-workbench-rhel ARG RSW_DOWNLOAD_URL=https://s3.amazonaws.com/rstudio-ide-build/server/centos7/x86_64 +ARG SCRIPTS_DIR=/opt/positscripts SHELL ["/bin/bash", "-o", "pipefail", "-c"] RUN yum install -y subversion \ @@ -27,6 +28,9 @@ RUN yum install -y subversion \ && yum clean all \ && 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 + 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/r-session-complete/Dockerfile.ubuntu2204 b/r-session-complete/Dockerfile.ubuntu2204 index 9bef24ac..be1817c0 100644 --- a/r-session-complete/Dockerfile.ubuntu2204 +++ b/r-session-complete/Dockerfile.ubuntu2204 @@ -9,6 +9,7 @@ ARG JUPYTERLAB_VERSION=3.6.5 ARG RSW_VERSION=2023.12.1+402.pro1 ARG RSW_NAME=rstudio-workbench ARG RSW_DOWNLOAD_URL=https://download2.rstudio.org/server/jammy/amd64 +ARG SCRIPTS_DIR=/opt/positscripts ENV WORKBENCH_JUPYTER_PATH=/usr/local/bin/jupyter @@ -36,6 +37,9 @@ RUN apt-get update \ && 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 + 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/r-session-complete/test/goss.yaml b/r-session-complete/test/goss.yaml index 09760e7c..0cf72448 100644 --- a/r-session-complete/test/goss.yaml +++ b/r-session-complete/test/goss.yaml @@ -14,10 +14,13 @@ file: exists: true {{ end }} /opt/rstudio-drivers: - exists: true - filetype: directory + exists: true + filetype: directory /var/lib/rstudio-server/r-versions: exists: false + /usr/local/bin/quarto: + exists: true + filetype: symlink command: "echo '{ \"cells\": [], \"metadata\": {}, \"nbformat\": 4, \"nbformat_minor\": 2}' | /opt/python/{{.Env.PYTHON_VERSION}}/bin/jupyter nbconvert --to notebook --stdin --stdout": @@ -52,3 +55,8 @@ command: title: jupyter_in_path_var timeout: 60000 exit-status: 0 + +# Ensure Quarto works + "/usr/local/bin/quarto check --quiet": + title: quarto_check + exit-status: 0 diff --git a/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 b/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 index 91418fee..ae566260 100644 --- a/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 +++ b/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 @@ -8,11 +8,11 @@ ARG PYTHON_VERSION=3.11.7 ARG PYTHON_VERSION_ALT=3.10.13 ARG PYTHON_VERSION_JUPYTER=3.10.13 ARG JUPYTERLAB_VERSION=3.6.7 -ARG QUARTO_VERSION=1.3.450 ARG DRIVERS_VERSION=2023.05.0 ARG RSW_VERSION=2023.12.1+402.pro1 ARG RSW_NAME=rstudio-workbench ARG RSW_DOWNLOAD_URL=https://download2.rstudio.org/server/focal/amd64 +ARG SCRIPTS_DIR=/opt/positscripts ENV STARTUP_DEBUG_MODE 0 ENV RSW_LICENSE "" @@ -83,12 +83,8 @@ ENV LANG en_US.UTF-8 ENV LANGUAGE en_US:en ENV LC_ALL en_US.UTF-8 -### Install Quarto ### -RUN curl -o quarto-linux-amd64.deb -L https://github.com/quarto-dev/quarto-cli/releases/download/v${QUARTO_VERSION}/quarto-${QUARTO_VERSION}-linux-amd64.deb \ - && apt-get update \ - && apt-get install -yq ./quarto-linux-amd64.deb \ - && rm -rf /var/lib/apt/lists/* \ - && rm quarto-linux-amd64.deb +### Install Quarto to PATH ### +RUN ln -s /lib/rstudio-server/bin/quarto/bin/quarto /usr/local/bin/quarto ### Install Pro Drivers ### RUN apt-get update \ diff --git a/workbench-for-google-cloud-workstations/test/goss.yaml b/workbench-for-google-cloud-workstations/test/goss.yaml index 412fae9d..fcb383d7 100644 --- a/workbench-for-google-cloud-workstations/test/goss.yaml +++ b/workbench-for-google-cloud-workstations/test/goss.yaml @@ -22,10 +22,6 @@ package: installed: true python-{{.Env.PYTHON_VERSION_ALT}}: installed: true - quarto: - installed: true - versions: - - {{.Env.QUARTO_VERSION}} rstudio-drivers: installed: true versions: @@ -152,6 +148,9 @@ file: contents: [ "/usr/bin/supervisord -c /etc/supervisor/supervisord.conf" ] + /usr/local/bin/quarto: + exists: true + filetype: symlink command: @@ -231,4 +230,9 @@ command: exec: /opt/R/{{$r_version_alt}}/bin/R --slave -e "library(\"{{.}}\")" timeout: 60000 exit-status: 0 - {{end}} \ No newline at end of file + {{end}} + +# Ensure Quarto works + "/usr/local/bin/quarto check --quiet": + title: quarto_check + exit-status: 0 diff --git a/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 b/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 index 11f93d3d..384d6466 100644 --- a/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 +++ b/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 @@ -10,7 +10,7 @@ ARG JUPYTERLAB_VERSION=3.6.7 ARG RSW_VERSION=2023.12.1+402.pro1 ARG RSW_NAME=rstudio-workbench ARG RSW_DOWNLOAD_URL=https://download2.rstudio.org/server/jammy/amd64 -ARG DEBIAN_FRONTEND=noninteractive +ARG SCRIPTS_DIR=/opt/positscripts # Set default env values ENV STARTUP_DEBUG_MODE 0 @@ -59,6 +59,9 @@ RUN apt-get update \ && 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 + 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-for-microsoft-azure-ml/test/goss.yaml b/workbench-for-microsoft-azure-ml/test/goss.yaml index 2c8ba3fe..b94fae54 100644 --- a/workbench-for-microsoft-azure-ml/test/goss.yaml +++ b/workbench-for-microsoft-azure-ml/test/goss.yaml @@ -86,6 +86,9 @@ file: exists: true contains: - "!Error reading /etc/rstudio/rserver.conf:" + /usr/local/bin/quarto: + exists: true + filetype: symlink command: "su rstudio-server -c 'touch /var/lib/rstudio-server/monitor/log/rstudio-server.log'": @@ -143,3 +146,8 @@ command: - {{ $pkg }} {{end}} {{end}} + +# Ensure Quarto works + "/usr/local/bin/quarto check --quiet": + title: quarto_check + exit-status: 0 diff --git a/workbench/Dockerfile.ubuntu2204 b/workbench/Dockerfile.ubuntu2204 index ad8dc96b..0166a8e3 100644 --- a/workbench/Dockerfile.ubuntu2204 +++ b/workbench/Dockerfile.ubuntu2204 @@ -10,6 +10,7 @@ ARG JUPYTERLAB_VERSION=3.6.7 ARG RSW_VERSION=2023.12.1+402.pro1 ARG RSW_NAME=rstudio-workbench ARG RSW_DOWNLOAD_URL=https://download2.rstudio.org/server/jammy/amd64 +ARG SCRIPTS_DIR=/opt/positscripts ENV STARTUP_DEBUG_MODE 0 ENV RSW_LICENSE "" @@ -62,6 +63,9 @@ RUN apt-get update \ && rm -rf /var/lib/rstudio-server/r-versions \ && rm -rf /var/lib/rstudio-launcher/Local/jobs/buildkitsandbox +### Install Quarto to PATH ### +RUN ln -s /lib/rstudio-server/bin/quarto/bin/quarto /usr/local/bin/quarto + 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/test/goss.yaml b/workbench/test/goss.yaml index a1339ce3..777a04ee 100644 --- a/workbench/test/goss.yaml +++ b/workbench/test/goss.yaml @@ -94,6 +94,9 @@ file: owner: root group: root mode: "0600" + /usr/local/bin/quarto: + exists: true + filetype: symlink command: "su rstudio-server -c 'touch /var/lib/rstudio-server/monitor/log/rstudio-server.log'": @@ -140,3 +143,8 @@ command: stdout: [ "/usr/bin/openssl" ] + +# Ensure Quarto works + "/usr/local/bin/quarto check --quiet": + title: quarto_check + exit-status: 0