From f477b8e41fc462ed13d9ec1745a234605f57e7be Mon Sep 17 00:00:00 2001 From: Tyler Date: Thu, 26 Sep 2024 10:24:16 -0400 Subject: [PATCH 1/7] Fix: Install `bash-completion` for `rspm` tab completions Refs: https://github.com/rstudio/package-manager/issues/14421 --- package-manager/Dockerfile.ubuntu2204 | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/package-manager/Dockerfile.ubuntu2204 b/package-manager/Dockerfile.ubuntu2204 index 771c5a75..bc8a3730 100644 --- a/package-manager/Dockerfile.ubuntu2204 +++ b/package-manager/Dockerfile.ubuntu2204 @@ -4,14 +4,19 @@ ARG PYTHON_VERSION=3.9.17 ARG PYTHON_VERSION_ALT=3.8.17 # Locale configuration --------------------------------------------------------# -ENV STARTUP_DEBUG_MODE 0 +ENV STARTUP_DEBUG_MODE=0 -ENV PATH /opt/rstudio-pm/bin:$PATH +ENV PATH=/opt/rstudio-pm/bin:$PATH # Required Python packages ----------------------------------------------------# RUN /opt/python/${PYTHON_VERSION}/bin/python3 -m pip install --no-cache-dir build virtualenv RUN /opt/python/${PYTHON_VERSION_ALT}/bin/python3 -m pip install --no-cache-dir build virtualenv +# Install bash auto completion ------------------------------------------------# +RUN apt-get update -qq && apt-get install -y --no-install-recommends \ + bash-completion && \ + apt-get clean && rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/* + # Download RStudio Package Manager ---------------------------------------------# ARG RSPM_VERSION=2024.08.2-9 ARG RSPM_DOWNLOAD_URL=https://cdn.rstudio.com/package-manager/deb/amd64 @@ -35,12 +40,11 @@ RUN mkdir -p /var/run/rstudio-pm \ USER rstudio-pm COPY rstudio-pm.gcfg /etc/rstudio-pm/rstudio-pm.gcfg -RUN echo "source <(rspm completion bash)" >> ~/.bashrc \ # Set up licensing to work in userspace mode. This will not prevent activating a # license as root, but it is required to activate one as the non-root user at # runtime. It's possible for this to fail and the trial will be considered over, # in which case we can ignore it anyway. - && license-manager initialize --userspace || true +RUN license-manager initialize --userspace || true ENTRYPOINT ["tini", "--"] CMD ["/usr/local/bin/startup.sh"] From 26291b5f49ef10cfb74a03a3c50a6c97e2e98981 Mon Sep 17 00:00:00 2001 From: edavidaja Date: Thu, 26 Sep 2024 12:16:22 -0400 Subject: [PATCH 2/7] Bump Connect to version 2024.09.0 --- Justfile | 2 +- connect-content-init/Dockerfile.ubuntu2204 | 2 +- connect-content-init/README.md | 6 +++--- connect/.env | 2 +- connect/Dockerfile.ubuntu2204 | 2 +- connect/README.md | 2 +- docker-bake.hcl | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Justfile b/Justfile index 7f67569a..ac062e79 100644 --- a/Justfile +++ b/Justfile @@ -7,7 +7,7 @@ sed_vars := if os() == "macos" { "-i ''" } else { "-i" } BUILDX_PATH := "" -RSC_VERSION := "2024.08.0" +RSC_VERSION := "2024.09.0" RSPM_VERSION := "2024.08.2-9" RSW_VERSION := "2024.09.0+375.pro3" diff --git a/connect-content-init/Dockerfile.ubuntu2204 b/connect-content-init/Dockerfile.ubuntu2204 index 9a260dba..428b6d4c 100644 --- a/connect-content-init/Dockerfile.ubuntu2204 +++ b/connect-content-init/Dockerfile.ubuntu2204 @@ -9,7 +9,7 @@ RUN apt-get update && \ apt-get install -y --no-install-recommends ca-certificates curl && \ rm -rf /var/lib/apt/lists/* -ARG RSC_VERSION=2024.08.0 +ARG RSC_VERSION=2024.09.0 SHELL ["/bin/bash", "-o", "pipefail", "-c"] RUN mkdir -p /rsc-staging && \ RSC_VERSION_URL=$(echo -n "${RSC_VERSION}" | sed 's/+/%2B/g') && \ diff --git a/connect-content-init/README.md b/connect-content-init/README.md index 1fce505f..f5b15378 100644 --- a/connect-content-init/README.md +++ b/connect-content-init/README.md @@ -9,7 +9,7 @@ # Supported tags and respective Dockerfile links -* [`jammy`, `ubuntu2204`, `jammy-2024.08.0`, `ubuntu2204-2024.08.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/connect/Dockerfile.2204) +* [`jammy`, `ubuntu2204`, `jammy-2024.09.0`, `ubuntu2204-2024.09.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/connect/Dockerfile.2204) # RStudio Connect Content Init Container @@ -31,7 +31,7 @@ The version of the release package to use can be overridden with the `RSC_VERSION` build arg. ```console -just build ubuntu2204 2024.08.0 +just build ubuntu2204 2024.09.0 ``` ## Testing @@ -56,7 +56,7 @@ just test You can see the different layers that make up the image: ```console -docker history rstudio/rstudio-connect-content-init-preview:2024.08.0-dev-326 +docker history rstudio/rstudio-connect-content-init-preview:2024.09.0-dev-326 ``` NOTE: almost all the image size is pandoc. diff --git a/connect/.env b/connect/.env index 142c04b8..d941ae40 100644 --- a/connect/.env +++ b/connect/.env @@ -1,4 +1,4 @@ -RSC_VERSION=2024.08.0 +RSC_VERSION=2024.09.0 R_VERSION=4.2.3 R_VERSION_ALT=4.1.3 PYTHON_VERSION=3.9.17 diff --git a/connect/Dockerfile.ubuntu2204 b/connect/Dockerfile.ubuntu2204 index 23a9c4e3..40f573f5 100644 --- a/connect/Dockerfile.ubuntu2204 +++ b/connect/Dockerfile.ubuntu2204 @@ -7,7 +7,7 @@ ARG R_VERSION=4.2.3 ARG R_VERSION_ALT=4.1.3 ARG PYTHON_VERSION=3.9.17 ARG PYTHON_VERSION_ALT=3.8.17 -ARG RSC_VERSION=2024.08.0 +ARG RSC_VERSION=2024.09.0 ARG QUARTO_VERSION=1.4.557 ARG SCRIPTS_DIR=/opt/positscripts diff --git a/connect/README.md b/connect/README.md index 488e72d3..252f015f 100644 --- a/connect/README.md +++ b/connect/README.md @@ -7,7 +7,7 @@ # Supported tags and respective Dockerfile links -* [`jammy`, `ubuntu2204`, `jammy-2024.08.0`, `ubuntu2204-2024.08.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/connect/Dockerfile.2204) +* [`jammy`, `ubuntu2204`, `jammy-2024.09.0`, `ubuntu2204-2024.09.0`](https://github.com/rstudio/rstudio-docker-products/blob/main/connect/Dockerfile.2204) # What is Posit Connect? diff --git a/docker-bake.hcl b/docker-bake.hcl index 5db13863..6e5e9bc5 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -1,6 +1,6 @@ ### Variable definitions ### variable CONNECT_VERSION { - default = "2024.08.0" + default = "2024.09.0" } variable PACKAGE_MANAGER_VERSION { From 1a0f205b507027fd255cc49f531c4e98c8117099 Mon Sep 17 00:00:00 2001 From: Cole Arendt Date: Fri, 27 Sep 2024 09:37:54 -0400 Subject: [PATCH 3/7] Update CODEOWNERS --- .github/CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index b377d884..7ad379ad 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,5 +1,5 @@ # format per https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners#about-code-owners -* @colearendt @ianpittwood @bschwedler @costrouc +* @ianpittwood @bschwedler @costrouc /connect/* @rstudio/connect /connect-content-init/* @rstudio/connect From d502705e949ba906cee9fb8109d365734460b2c9 Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Tue, 1 Oct 2024 12:13:04 -0400 Subject: [PATCH 4/7] Upgrade JupyterLab to 4.x --- .../Dockerfile.ubuntu2204 | 20 ++++--------- .../conf/jupyter.conf | 3 +- .../Dockerfile.ubuntu2204 | 28 +++++-------------- .../conf/jupyter.conf | 3 +- workbench/Dockerfile.ubuntu2204 | 20 ++++++------- workbench/conf/jupyter.conf | 3 +- 6 files changed, 24 insertions(+), 53 deletions(-) diff --git a/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 b/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 index 9e8186f2..e0c638b9 100644 --- a/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 +++ b/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 @@ -118,23 +118,15 @@ RUN mkdir -p /opt/rstudio-license/ \ ### Install Jupyter and extensions ### RUN /opt/python/"${PYTHON_VERSION_JUPYTER}"/bin/python -m venv /opt/python/jupyter \ - && /opt/python/jupyter/bin/pip install \ - jupyter \ - jupyterlab=="${JUPYTERLAB_VERSION}" \ - rsconnect_jupyter \ - rsconnect_python \ - rsp_jupyter \ - workbench_jupyterlab \ + && /opt/python/jupyter/bin/python -m pip install\ + jupyterlab~=4.2.4 \ + notebook \ + pwb_jupyterlab~=1.0 \ && ln -s /opt/python/jupyter/bin/jupyter /usr/local/bin/jupyter \ - && /opt/python/jupyter/bin/jupyter-nbextension install --sys-prefix --py rsp_jupyter \ - && /opt/python/jupyter/bin/jupyter-nbextension enable --sys-prefix --py rsp_jupyter \ - && /opt/python/jupyter/bin/jupyter-nbextension install --sys-prefix --py rsconnect_jupyter \ - && /opt/python/jupyter/bin/jupyter-nbextension enable --sys-prefix --py rsconnect_jupyter \ - && /opt/python/jupyter/bin/jupyter-serverextension enable --sys-prefix --py rsconnect_jupyter \ + && /opt/python/jupyter/bin/python -m pip install ipykernel \ && /opt/python/jupyter/bin/python -m ipykernel install --name py${PYTHON_VERSION} --display-name "Python ${PYTHON_VERSION}" \ && /opt/python/jupyter/bin/python -m ipykernel install --name py${PYTHON_VERSION_ALT} --display-name "Python ${PYTHON_VERSION_ALT}" \ - && /opt/python/${PYTHON_VERSION}/bin/python3 -m pip cache purge \ - && /opt/python/${PYTHON_VERSION_ALT}/bin/python3 -m pip cache purge + && /opt/python/jupyter/bin/python3 -m pip cache purge ADD --chmod=755 https://raw.githubusercontent.com/rstudio/wait-for-it/master/wait-for-it.sh /usr/local/bin/wait-for-it.sh diff --git a/workbench-for-google-cloud-workstations/conf/jupyter.conf b/workbench-for-google-cloud-workstations/conf/jupyter.conf index c38488e4..6e7c73b8 100644 --- a/workbench-for-google-cloud-workstations/conf/jupyter.conf +++ b/workbench-for-google-cloud-workstations/conf/jupyter.conf @@ -1,7 +1,6 @@ -notebooks-enabled=1 labs-enabled=1 -jupyter-exe=/usr/local/bin/jupyter +jupyter-exe=/opt/python/jupyter/bin/jupyter lab-args=--no-browser --allow-root --ip=0.0.0.0 --ServerApp.allow_origin="*" --ServerApp.allow_remote_access=True --LabApp.token="" --debug default-session-cluster=Local diff --git a/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 b/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 index ac1ec283..abde1303 100644 --- a/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 +++ b/workbench-for-microsoft-azure-ml/Dockerfile.ubuntu2204 @@ -89,28 +89,14 @@ RUN apt-get update --fix-missing -qq \ ### Install Jupyter and extensions ### RUN /opt/python/"${PYTHON_VERSION_JUPYTER}"/bin/python -m venv /opt/python/jupyter \ && /opt/python/jupyter/bin/pip install \ - jupyter \ - jupyterlab=="${JUPYTERLAB_VERSION}" \ - rsconnect_jupyter \ - rsconnect_python \ - rsp_jupyter \ - workbench_jupyterlab \ - && /opt/python/jupyter/bin/jupyter kernelspec remove python3 -f \ - && /opt/python/jupyter/bin/pip uninstall -y ipykernel \ + jupyterlab~=4.2.4 \ + notebook \ + pwb_jupyterlab~=1.0 \ && ln -s /opt/python/jupyter/bin/jupyter /usr/local/bin/jupyter \ - && /opt/python/jupyter/bin/jupyter-nbextension install --sys-prefix --py rsp_jupyter \ - && /opt/python/jupyter/bin/jupyter-nbextension enable --sys-prefix --py rsp_jupyter \ - && /opt/python/jupyter/bin/jupyter-nbextension install --sys-prefix --py rsconnect_jupyter \ - && /opt/python/jupyter/bin/jupyter-nbextension enable --sys-prefix --py rsconnect_jupyter \ - && /opt/python/jupyter/bin/jupyter-serverextension enable --sys-prefix --py rsconnect_jupyter \ - && /opt/python/${PYTHON_VERSION}/bin/pip install \ - ipykernel \ - virtualenv \ - && /opt/python/${PYTHON_VERSION}/bin/python -m ipykernel install --name py${PYTHON_VERSION} --display-name "Python ${PYTHON_VERSION}" \ - && /opt/python/${PYTHON_VERSION_ALT}/bin/pip install \ - ipykernel \ - virtualenv \ - && /opt/python/${PYTHON_VERSION_ALT}/bin/python -m ipykernel install --name py${PYTHON_VERSION_ALT} --display-name "Python ${PYTHON_VERSION_ALT}" + && /opt/python/jupyter/bin/python -m pip install ipykernel \ + && /opt/python/jupyter/bin/python -m ipykernel install --name py${PYTHON_VERSION} --display-name "Python ${PYTHON_VERSION}" \ + && /opt/python/jupyter/bin/python -m ipykernel install --name py${PYTHON_VERSION_ALT} --display-name "Python ${PYTHON_VERSION_ALT}" \ + && /opt/python/jupyter/bin/python3 -m pip cache purge ### Install basic data science packages for Python and R ### COPY deps/* / diff --git a/workbench-for-microsoft-azure-ml/conf/jupyter.conf b/workbench-for-microsoft-azure-ml/conf/jupyter.conf index c38488e4..6e7c73b8 100644 --- a/workbench-for-microsoft-azure-ml/conf/jupyter.conf +++ b/workbench-for-microsoft-azure-ml/conf/jupyter.conf @@ -1,7 +1,6 @@ -notebooks-enabled=1 labs-enabled=1 -jupyter-exe=/usr/local/bin/jupyter +jupyter-exe=/opt/python/jupyter/bin/jupyter lab-args=--no-browser --allow-root --ip=0.0.0.0 --ServerApp.allow_origin="*" --ServerApp.allow_remote_access=True --LabApp.token="" --debug default-session-cluster=Local diff --git a/workbench/Dockerfile.ubuntu2204 b/workbench/Dockerfile.ubuntu2204 index f76f011f..8a9c447b 100644 --- a/workbench/Dockerfile.ubuntu2204 +++ b/workbench/Dockerfile.ubuntu2204 @@ -80,19 +80,15 @@ COPY startup/* /startup/base/ COPY supervisord.conf /etc/supervisor/supervisord.conf RUN /opt/python/"${PYTHON_VERSION_JUPYTER}"/bin/python -m venv /opt/python/jupyter \ - && /opt/python/jupyter/bin/pip install \ - jupyter \ - jupyterlab=="${JUPYTERLAB_VERSION}" \ - rsconnect_jupyter \ - rsconnect_python \ - rsp_jupyter \ - workbench_jupyterlab \ + && /opt/python/jupyter/bin/python -m pip install \ + jupyterlab~=4.2.4 \ + notebook \ + pwb_jupyterlab~=1.0 \ && ln -s /opt/python/jupyter/bin/jupyter /usr/local/bin/jupyter \ - && /opt/python/jupyter/bin/jupyter-nbextension install --sys-prefix --py rsp_jupyter \ - && /opt/python/jupyter/bin/jupyter-nbextension enable --sys-prefix --py rsp_jupyter \ - && /opt/python/jupyter/bin/jupyter-nbextension install --sys-prefix --py rsconnect_jupyter \ - && /opt/python/jupyter/bin/jupyter-nbextension enable --sys-prefix --py rsconnect_jupyter \ - && /opt/python/jupyter/bin/jupyter-serverextension enable --sys-prefix --py rsconnect_jupyter + && /opt/python/jupyter/bin/python -m pip install ipykernel \ + && /opt/python/jupyter/bin/python -m ipykernel install --name py${PYTHON_VERSION} --display-name "Python ${PYTHON_VERSION}" \ + && /opt/python/jupyter/bin/python -m ipykernel install --name py${PYTHON_VERSION_ALT} --display-name "Python ${PYTHON_VERSION_ALT}" \ + && /opt/python/jupyter/bin/python -m pip cache purge RUN curl -fsSL -o /usr/local/bin/wait-for-it.sh https://raw.githubusercontent.com/rstudio/wait-for-it/master/wait-for-it.sh && \ chmod +x /usr/local/bin/wait-for-it.sh diff --git a/workbench/conf/jupyter.conf b/workbench/conf/jupyter.conf index abc5cfd5..1b789302 100644 --- a/workbench/conf/jupyter.conf +++ b/workbench/conf/jupyter.conf @@ -1,6 +1,5 @@ -notebooks-enabled=1 labs-enabled=1 -# jupyter-exe=/usr/local/bin/jupyter +jupyter-exe=/opt/python/jupyter/bin/jupyter default-session-cluster=Local From 27dfcbcb826cd99ea3fd92a865b5a2b90f988bfd Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Tue, 1 Oct 2024 12:34:15 -0400 Subject: [PATCH 5/7] Upgrade Jupyterlab in r-session-complete --- r-session-complete/Dockerfile.ubuntu2204 | 27 +++++++++++------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/r-session-complete/Dockerfile.ubuntu2204 b/r-session-complete/Dockerfile.ubuntu2204 index 83e4369d..6fde09a9 100644 --- a/r-session-complete/Dockerfile.ubuntu2204 +++ b/r-session-complete/Dockerfile.ubuntu2204 @@ -43,21 +43,18 @@ 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 -RUN /opt/python/"${PYTHON_VERSION}"/bin/pip install \ - jupyter \ - jupyterlab=="${JUPYTERLAB_VERSION}" \ - rsconnect_jupyter \ - rsconnect_python \ - rsp_jupyter \ - workbench_jupyterlab \ - && ln -s /opt/python/"${PYTHON_VERSION}"/bin/jupyter /usr/local/bin/jupyter \ - && /opt/python/"${PYTHON_VERSION}"/bin/jupyter-nbextension install --sys-prefix --py rsp_jupyter \ - && /opt/python/"${PYTHON_VERSION}"/bin/jupyter-nbextension enable --sys-prefix --py rsp_jupyter \ - && /opt/python/"${PYTHON_VERSION}"/bin/jupyter-nbextension install --sys-prefix --py rsconnect_jupyter \ - && /opt/python/"${PYTHON_VERSION}"/bin/jupyter-nbextension enable --sys-prefix --py rsconnect_jupyter \ - && /opt/python/"${PYTHON_VERSION}"/bin/jupyter-serverextension enable --sys-prefix --py rsconnect_jupyter - -ENV PATH="/opt/python/${PYTHON_VERSION}/bin:${PATH}" +RUN /opt/python/"${PYTHON_VERSION_JUPYTER}"/bin/python -m venv /opt/python/jupyter \ + && /opt/python/jupyter/bin/python -m pip install \ + jupyterlab~=4.2.4 \ + notebook \ + pwb_jupyterlab~=1.0 \ + && ln -s /opt/python/jupyter/bin/jupyter /usr/local/bin/jupyter \ + && /opt/python/jupyter/bin/python -m pip install ipykernel \ + && /opt/python/jupyter/bin/python -m ipykernel install --name py${PYTHON_VERSION} --display-name "Python ${PYTHON_VERSION}" \ + && /opt/python/jupyter/bin/python -m ipykernel install --name py${PYTHON_VERSION_ALT} --display-name "Python ${PYTHON_VERSION_ALT}" \ + && /opt/python/jupyter/bin/python -m pip cache purge + +ENV PATH="/opt/python/jupyter/bin:${PATH}" COPY vscode.extensions.conf /etc/rstudio/vscode.extensions.conf From ce163907080f35c5c889f9520a3697f6bedfda3a Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Tue, 1 Oct 2024 12:47:43 -0400 Subject: [PATCH 6/7] Fix PYTHON_VERSION_JUPYTER usage --- r-session-complete/Dockerfile.ubuntu2204 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/r-session-complete/Dockerfile.ubuntu2204 b/r-session-complete/Dockerfile.ubuntu2204 index 6fde09a9..46784c18 100644 --- a/r-session-complete/Dockerfile.ubuntu2204 +++ b/r-session-complete/Dockerfile.ubuntu2204 @@ -43,7 +43,7 @@ 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 -RUN /opt/python/"${PYTHON_VERSION_JUPYTER}"/bin/python -m venv /opt/python/jupyter \ +RUN /opt/python/"${PYTHON_VERSION}"/bin/python -m venv /opt/python/jupyter \ && /opt/python/jupyter/bin/python -m pip install \ jupyterlab~=4.2.4 \ notebook \ From 3bcd17001ea31109f4917da86df5a4dea1e0bc71 Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Tue, 1 Oct 2024 12:52:00 -0400 Subject: [PATCH 7/7] Fix test jupyter path --- r-session-complete/test/goss.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/r-session-complete/test/goss.yaml b/r-session-complete/test/goss.yaml index c5ea93a4..030ff180 100644 --- a/r-session-complete/test/goss.yaml +++ b/r-session-complete/test/goss.yaml @@ -23,7 +23,7 @@ file: filetype: symlink command: - "echo '{ \"cells\": [], \"metadata\": {}, \"nbformat\": 4, \"nbformat_minor\": 2}' | /opt/python/{{.Env.PYTHON_VERSION}}/bin/jupyter nbconvert --to notebook --stdin --stdout": + "echo '{ \"cells\": [], \"metadata\": {}, \"nbformat\": 4, \"nbformat_minor\": 2}' | /opt/python/jupyter/bin/jupyter nbconvert --to notebook --stdin --stdout": title: jupyter_works timeout: 60000 exit-status: 0