diff --git a/chart/values.yaml b/chart/values.yaml index a328d8b..b6a4acb 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -8,7 +8,7 @@ ssh: enabled: true image: name: astronomycommons/jupyterhub-ssh - tag: 0.0.7 + tag: 0.1.0 hostname: ssh config: jump: @@ -191,7 +191,7 @@ jupyterhub: - 22 image: name: astronomycommons/public-hub-singleuser - tag: 0.6.1 + tag: 0.7.0 pullPolicy: Always # assigns the notebook pod the service account called jupyter-spark-serviceaccount in the k8s cluster # this service account is created if rbac.enabled is set to true in this Helm chart diff --git a/images/notebook/Dockerfile b/images/notebook/Dockerfile index 8bc40e8..33d1717 100644 --- a/images/notebook/Dockerfile +++ b/images/notebook/Dockerfile @@ -1,4 +1,4 @@ -FROM jupyterhub/k8s-singleuser-sample:1.1.3 +FROM quay.io/jupyter/base-notebook:ubuntu-22.04 # Add RUN statements to install packages as the $NB_USER defined in the base images. @@ -37,7 +37,7 @@ RUN apt-get install -y --fix-missing \ openssh-server \ htop -# Install Desktop +# Install Desktop https://github.com/jupyterhub/jupyter-remote-desktop-proxy RUN apt-get install -y --fix-missing \ dbus-x11 \ xfce4 \ @@ -46,10 +46,15 @@ RUN apt-get install -y --fix-missing \ xfce4-settings \ xorg \ xubuntu-icon-theme \ + tigervnc-standalone-server \ + tigervnc-xorg-extension \ + # Install web browser firefox \ # Disable creation of Music, Documents, etc.. directories # ref: https://unix.stackexchange.com/questions/268720/who-is-creating-documents-video-pictures-etc-in-home-directory && apt-get remove -y xdg-user-dirs \ + # Disable screensaver/lock screen + && apt-get remove -y xfce4-screensaver \ # Disable the Applications|Log Out menu item in XFCE # ref: https://github.com/yuvipanda/jupyter-desktop-server/issues/16 && rm -f /usr/share/applications/xfce4-session-logout.desktop @@ -68,7 +73,8 @@ RUN groupadd -g 996 admin \ # get sudoers config from file on NFS && echo "#includedir /home/admin/etc/sudoers.d" >> /etc/sudoers - +RUN mkdir -p /opt/conda \ + && mkdir -p /opt/axs # Update conda permissions RUN chown -R admin:admin /opt @@ -85,7 +91,7 @@ ENV PATH $PATH:$SPARK_HOME/bin:$SPARK_HOME/sbin RUN cd /tmp \ # Download AXS && wget -q -O axs-distribution.tar.gz https://github.com/astronomy-commons/axs/releases/download/${AXS_VERSION}/axs-${AXS_VERSION}.tgz \ - && mkdir $SPARK_HOME \ + && mkdir -p $SPARK_HOME \ && tar xf axs-distribution.tar.gz --strip 1 -C $SPARK_HOME \ && rm axs-distribution.tar.gz \ # Install required jars for Spark @@ -101,49 +107,15 @@ RUN cd /tmp \ # Postgres connector && curl -O -s https://jdbc.postgresql.org/download/postgresql-42.5.1.jar -# Install mamba -RUN conda install --quiet --yes -c conda-forge mamba - -# Install packages from main conda repository +# Install conda packages RUN mamba install --quiet --yes \ - # Install AXS dependencies: pyarrow, numpy, pandas, healpy - 'pyarrow' \ - 'numpy' \ - 'pandas' \ - 'healpy' \ - # pytables for Pandas, allows reading of hdf5 files - 'pytables' \ - # plotting - 'matplotlib' \ - # pulling demo notebooks - 'nbgitpuller' \ - # interacting with K8s cluster - 'python-kubernetes' \ - # Dask - 'dask' - -# Install packages from conda forge -RUN mamba install --quiet --yes -c conda-forge \ - # server proxy extension - 'jupyter-server-proxy' \ - # resource usage extension - 'jupyter-resource-usage' - -# Install jupyter-desktop-server -RUN mamba install -c manics websockify \ - && pip install git+https://github.com/mjuric/jupyter-desktop-server - -# Install packages with pip -RUN python -m pip install \ - jupyterlab-topbar \ - jupyterlab-system-monitor \ - nbgitpuller \ - dask_kubernetes \ - adlfs - -# Install labextensions -RUN jupyter labextension install \ - jupyterlab-topbar-text + pytables \ + nb_conda_kernels \ + websockify + +# Install Python requirements +COPY requirements.txt requirements.txt +RUN python -m pip install -r requirements.txt # Clean Conda RUN conda clean --all -f -y diff --git a/images/notebook/requirements.txt b/images/notebook/requirements.txt new file mode 100644 index 0000000..b68eaed --- /dev/null +++ b/images/notebook/requirements.txt @@ -0,0 +1,18 @@ +jupyter-server-proxy +jupyter-resource-usage +jupyter-remote-desktop-proxy +jupyterlab-topbar-text +jupyterlab-logout +jupyterlab-theme-toggler +nbgitpuller +adlfs +pyarrow +numpy +pandas +healpy +matplotlib +python-kubernetes +dask +dask-labextension +dask_kubernetes +ipywidgets diff --git a/images/notebook/scripts/entrypoint.sh b/images/notebook/scripts/entrypoint.sh index 1c862f2..fafdc93 100755 --- a/images/notebook/scripts/entrypoint.sh +++ b/images/notebook/scripts/entrypoint.sh @@ -31,7 +31,8 @@ case "$1" in *) source /usr/local/bin/pre-start-source.sh export CONTAINER_TYPE="notebook" - CMD=("/usr/local/bin/start-notebook.sh" + CMD=("/usr/local/bin/start.sh" + "/usr/local/bin/start-notebook.sh" "${@:2}") ;; esac diff --git a/images/ssh/Dockerfile b/images/ssh/Dockerfile index 7f4b657..42438f4 100644 --- a/images/ssh/Dockerfile +++ b/images/ssh/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:18.04 +FROM ubuntu:22.04 USER root RUN apt-get -y update