diff --git a/r-session-complete/Dockerfile.ubuntu2204 b/r-session-complete/Dockerfile.ubuntu2204 index 83e4369d4..46784c189 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}"/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 diff --git a/r-session-complete/test/goss.yaml b/r-session-complete/test/goss.yaml index c5ea93a40..030ff1804 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 diff --git a/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 b/workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204 index 9e8186f29..e0c638b92 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 c38488e4a..6e7c73b85 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 ac1ec2834..abde1303f 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 c38488e4a..6e7c73b85 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 f76f011fd..8a9c447b9 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 abc5cfd53..1b789302a 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