Skip to content

Commit

Permalink
update ubuntu version (#3)
Browse files Browse the repository at this point in the history
* update ubuntu version

* fix desktop

* remove screensaver
  • Loading branch information
stevenstetzler authored Aug 5, 2024
1 parent 181bdd0 commit 0ad6d88
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 50 deletions.
4 changes: 2 additions & 2 deletions chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ssh:
enabled: true
image:
name: astronomycommons/jupyterhub-ssh
tag: 0.0.7
tag: 0.1.0
hostname: ssh
config:
jump:
Expand Down Expand Up @@ -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
Expand Down
64 changes: 18 additions & 46 deletions images/notebook/Dockerfile
Original file line number Diff line number Diff line change
@@ -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.

Expand Down Expand Up @@ -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 \
Expand All @@ -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
Expand All @@ -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

Expand All @@ -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
Expand All @@ -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
Expand Down
18 changes: 18 additions & 0 deletions images/notebook/requirements.txt
Original file line number Diff line number Diff line change
@@ -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
3 changes: 2 additions & 1 deletion images/notebook/scripts/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion images/ssh/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:18.04
FROM ubuntu:22.04

USER root
RUN apt-get -y update
Expand Down

0 comments on commit 0ad6d88

Please sign in to comment.