Skip to content

Commit

Permalink
soars summer 2024
Browse files Browse the repository at this point in the history
  • Loading branch information
julienchastang committed Aug 9, 2024
1 parent a2ecefd commit 2463719
Show file tree
Hide file tree
Showing 2 changed files with 96 additions and 0 deletions.
37 changes: 37 additions & 0 deletions jupyter-images/soars-summer-2024/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Heavily borrowed from docker-stacks/scipy-notebook/
# https://github.com/jupyter/docker-stacks/blob/main/scipy-notebook/Dockerfile

ARG BASE_CONTAINER=jupyter/scipy-notebook:latest
FROM $BASE_CONTAINER

LABEL maintainer="Unidata <support-python@unidata.ucar.edu>"

USER root

# Fix: https://github.com/hadolint/hadolint/wiki/DL4006
# Fix: https://github.com/koalaman/shellcheck/wiki/SC3014
SHELL ["/bin/bash", "-o", "pipefail", "-c"]

ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update --yes && \
apt-get upgrade --yes && \
apt-get install --yes --no-install-recommends \
bzip2 wget curl && \
apt-get install -y python3.10 python3.10-distutils && \
curl -sS https://bootstrap.pypa.io/get-pip.py | python3.10 && \
ln -sfn /usr/bin/python3.10 /usr/bin/python3 && \
ln -sfn /usr/bin/python3 /usr/bin/python && \
ln -sfn /usr/bin/pip3 /usr/bin/pip && \
pip install --no-cache-dir jupyterhub==3.0.0 && \
pip install --no-cache-dir --upgrade jupyterlab notebook jupyter_server jupyterlab-git && \
python3 -m pip install jupyterlab-github ipydrawio[all] jupyter_ai nbdime && \
apt-get clean && rm -rf /var/lib/apt/lists/* && \
echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && \
fix-permissions "${HOME}" && \
locale-gen

USER $NB_UID

COPY Acknowledgements.ipynb /

USER $NB_UID
59 changes: 59 additions & 0 deletions jupyter-images/soars-summer-2024/secrets.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
hub:
cookieSecret: "xxx"

config:
Authenticator:
admin_users:
- admin
allowed_users:
- user
GitHubOAuthenticator:
client_id: "xxx"
client_secret: "xxx"
oauth_callback_url: "https://soars.unidata.ucar.edu:443/oauth_callback"
JupyterHub:
authenticator_class: github

proxy:
secretToken: "xxx"

ingress:
enabled: true
annotations:
kubernetes.io/ingress.class: "nginx"
cert-manager.io/issuer: "incommon"
nginx.ingress.kubernetes.io/proxy-body-size: 300m
hosts:
- soars.unidata.ucar.edu
tls:
- hosts:
- soars.unidata.ucar.edu
secretName: cert-secret

singleuser:
extraEnv:
NBGITPULLER_DEPTH: "0"
storage:
capacity: 5Gi
startTimeout: 600
memory:
guarantee: 4G
limit: 4G
cpu:
guarantee: 1
limit: 2
defaultUrl: "/lab"
image:
name: "unidata/soars-summer-2023"
tag: "2023May20_195258_cd799d49"
lifecycleHooks:
postStart:
exec:
command:
- "sh"
- "-c"
- >
cp -t /home/jovyan /Acknowledgements.ipynb;
dir="/home/jovyan/.ssh"; [ -d $dir ] && \
{ chmod 700 $dir && chmod -f 600 $dir/* && \
chmod -f 644 $dir/*.pub; } || true

0 comments on commit 2463719

Please sign in to comment.