diff --git a/Dockerfile b/Dockerfile index 72835b8..9145097 100644 --- a/Dockerfile +++ b/Dockerfile @@ -48,15 +48,19 @@ RUN apt-get update > /dev/null && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* -COPY install-mambaforge.bash /tmp/install-mambaforge.bash -RUN /tmp/install-mambaforge.bash +COPY --chown=1000:1000 install-miniforge.bash /tmp/install-miniforge.bash +RUN /tmp/install-miniforge.bash +RUN rm -f /tmp/install-miniforge.bash + +# needed for building on mac see DH-394 +RUN chown -Rh ${NB_USER}:${NB_USER} ${HOME} USER ${NB_USER} -COPY environment.yml /tmp/environment.yml -COPY infra-requirements.txt /tmp/infra-requirements.txt +COPY --chown=1000:1000 environment.yml /tmp/environment.yml RUN mamba env update -p ${CONDA_DIR} -f /tmp/environment.yml && \ mamba clean -afy +RUN rm -f /tmp/environment.yml # DH-327, very similar to what was done for datahub in DH-164 ENV PLAYWRIGHT_BROWSERS_PATH ${CONDA_DIR} @@ -104,4 +108,8 @@ RUN install2.r --error --skipinstalled \ # Use simpler locking strategy COPY file-locks /etc/rstudio/file-locks +# Doing a little cleanup +RUN rm -rf /tmp/downloaded_packages +RUN rm -rf ${HOME}/.cache + ENTRYPOINT ["tini", "--"] diff --git a/environment.yml b/environment.yml index 28fd179..85fcb28 100644 --- a/environment.yml +++ b/environment.yml @@ -4,20 +4,44 @@ channels: - conda-forge dependencies: -- syncthing==1.25.0 -- jupyter-rsession-proxy==2.2.0 -# https://github.com/berkeley-dsep-infra/datahub/issues/5251 -- nodejs=16 # code-server requires node < 17 -- jupyter-server-proxy==4.2.0 -- jupyter-vscode-proxy==0.5 -- code-server==4.10.1 -# bug w/notebook and traitlets: https://github.com/jupyter/notebook/issues/7048 -- traitlets=5.9.* +# Items required for basic level functionality +- gh-scoped-creds==4.1 +- git==2.47.0 +- jupyter-resource-usage=1.1.0 +- jupyterhub==4.1.6 +- jupyterlab==4.2.5 +- jupyter_server==2.14.2 +- jupyterlab-git==0.50.1 +- jupytext==1.16.4 +- nbgitpuller==1.2.1 +- notebook==7.2.2 +- python==3.11.* + +# vscode +- code-server==4.23.1 +- jupyter-vscode-proxy==0.6 + +# other packages +- syncthing==1.27.12 +- jupyter-rsession-proxy==2.2.1 +- jupyter-server-proxy==4.4.0 +- jupyter-syncthing-proxy==1.0.3 +- traitlets=5.14.3 +- appmode==1.0.0 +- ipywidgets==8.1.2 + +- pip==24.2 - pip: - - -r /tmp/infra-requirements.txt - otter-grader==3.1.4 # DH-327 - nbconvert[webpdf]==7.16.4 # for notebook exporting - nb2pdf==0.6.2 - nbpdfexport==0.2.1 + # from infra-requirements + - jupyter-archive==3.4.0 + - rise==5.7.1 + - git+https://github.com/shaneknapp/python-popularity-contest.git@add-error-handling + - git-credential-helpers==0.2 + - jupyter-tree-download==1.0.1 + diff --git a/infra-requirements.txt b/infra-requirements.txt deleted file mode 100644 index 0fb0bd9..0000000 --- a/infra-requirements.txt +++ /dev/null @@ -1,29 +0,0 @@ -# WARNING: Original source at scripts/infra-packages/requirements.txt -# PLEASE DO NOT EDIT ELSEWHERE -# After editing scripts/infra-packages/requirements.txt, please run -# scripts/infra-packages/sync.bash. - -# This file pins versions of notebook related python packages we want -# across all hubs. This makes sure we don't need to upgrade them -# everwhere one by one. - -# FIXME: Freeze this to get exact versions of all dependencies -notebook==7.0.7 -jupyterlab==4.0.11 -nbgitpuller==1.2.1 -jupyter-resource-usage==1.0.1 -# Matches version in images/hub/Dockerfile -jupyterhub==4.1.6 -appmode==0.8.0 -ipywidgets==8.0.7 -jupyter-tree-download==1.0.1 -git-credential-helpers==0.2 -# Measure popularity of different packages in our hubs -# https://discourse.jupyter.org/t/request-for-implementation-instrument-libraries-actively-used-by-users-on-a-jupyterhub/7994?u=yuvipanda -git+https://github.com/shaneknapp/python-popularity-contest.git@add-error-handling -# RISE is useful for presentations - see https://github.com/berkeley-dsep-infra/datahub/issues/2527 -RISE==5.7.1 -# syncthing for dropbox-like functionality -jupyter-syncthing-proxy==1.0.3 -# jupyter archival tool for easy user downloads -jupyter-archive==3.4.0 diff --git a/install-mambaforge.bash b/install-miniforge.bash similarity index 83% rename from install-mambaforge.bash rename to install-miniforge.bash index 38c5cef..ad17ff1 100755 --- a/install-mambaforge.bash +++ b/install-miniforge.bash @@ -3,10 +3,10 @@ set -ex cd $(dirname $0) -MAMBAFORGE_VERSION='23.1.0-1' +MINIFORGE_VERSION='24.7.1-2' -URL="https://github.com/conda-forge/miniforge/releases/download/${MAMBAFORGE_VERSION}/Mambaforge-${MAMBAFORGE_VERSION}-Linux-x86_64.sh" -INSTALLER_PATH=/tmp/mambaforge-installer.sh +URL="https://github.com/conda-forge/miniforge/releases/download/${MINIFORGE_VERSION}/Miniforge3-${MINIFORGE_VERSION}-Linux-x86_64.sh" +INSTALLER_PATH=/tmp/miniforge-installer.sh wget --quiet $URL -O ${INSTALLER_PATH} chmod +x ${INSTALLER_PATH} @@ -33,6 +33,6 @@ rm ${INSTALLER_PATH} # Remove the pip cache created as part of installing mambaforge rm -rf /root/.cache -chown -R $NB_USER:$NB_USER ${CONDA_DIR} +chown -Rh $NB_USER:$NB_USER ${CONDA_DIR} conda list -n root