Skip to content

Commit

Permalink
graphcast hub
Browse files Browse the repository at this point in the history
  • Loading branch information
julienchastang committed Nov 15, 2024
1 parent 870556a commit 137c70e
Show file tree
Hide file tree
Showing 3 changed files with 133 additions and 0 deletions.
38 changes: 38 additions & 0 deletions jupyter-images/fall-2024/tm/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Heavily borrowed from docker-stacks/minimal-notebook/
# https://github.com/jupyter/docker-stacks/blob/main/minimal-notebook/Dockerfile

ARG BASE_CONTAINER=jupyter/minimal-notebook
FROM $BASE_CONTAINER

ENV DEFAULT_ENV_NAME=tm-fall-2024 EDITOR=nano VISUAL=nano

LABEL maintainer="Unidata <[email protected]>"

USER root

RUN apt-get update && \
apt-get install -y --no-install-recommends vim nano curl zip unzip && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

USER $NB_UID

ADD environment.yml /tmp

RUN conda install --quiet --yes \
'conda-forge::nb_conda_kernels' \
'conda-forge::jupyterlab-git' \
'conda-forge::ipywidgets' && \
conda env update --name $DEFAULT_ENV_NAME -f /tmp/environment.yml && \
pip install --no-cache-dir nbgitpuller && \
conda clean --all -f -y && \
jupyter lab clean -y && \
npm cache clean --force && \
rm -rf /home/$NB_USER/.cache/yarn && \
rm -rf /home/$NB_USER/.node-gyp && \
fix-permissions $CONDA_DIR && \
fix-permissions /home/$NB_USER

COPY Acknowledgements.ipynb /

USER $NB_UID
29 changes: 29 additions & 0 deletions jupyter-images/fall-2024/tm/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: tm-fall-2024
channels:
- nvidia
- pytorch
- defaults
- conda-forge
dependencies:
# Required by JupyterLab
- python=3.10
- nb_conda_kernels
- ipykernel
- notebook
- jupyter_server
# User requested packages
- cartopy
- cudatoolkit
- ipywidgets
- matplotlib
- metpy
- numpy
- pandas
- pip
- pytorch-cuda=12.1
- scikit-learn
- seaborn
- siphon
- xarray
- pip:
- ai-models-fourcastnetv2
66 changes: 66 additions & 0 deletions jupyter-images/fall-2024/tm/secrets.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
hub:
cookieSecret: "xxx"
config:
Authenticator:
admin_users:
- admins
#If you have a large list of users, consider using allowed_users.yaml
allowed_users:
- users
# necessary for jhub admins to add user via admin page `<url>/hub/admin`
allow_existing_users: true
GitHubOAuthenticator:
client_id: "xxx"
client_secret: "xxx"
oauth_callback_url: "https://tm24f-1.ees220002.projects.jetstream-cloud.org:443/oauth_callback"
JupyterHub:
authenticator_class: github

proxy:
secretToken: "xxx"

ingress:
enabled: true
annotations:
kubernetes.io/ingress.class: "nginx"
cert-manager.io/cluster-issuer: "letsencrypt"
#For manually issuing certificates: see vms/jupyter/readme.md
#cert-manager.io/issuer: "incommon"
nginx.ingress.kubernetes.io/proxy-body-size: 500m
hosts:
- "tm24f-1.ees220002.projects.jetstream-cloud.org"
tls:
- hosts:
- "tm24f-1.ees220002.projects.jetstream-cloud.org"
secretName: certmanager-tls-jupyterhub

singleuser:
extraEnv:
NBGITPULLER_DEPTH: "0"
storage:
capacity: 10Gi
startTimeout: 600
memory:
guarantee: 4G
limit: 4G
cpu:
guarantee: 1
limit: 2
defaultUrl: "/lab"
image:
name: "unidata/tm24f"
tag: "xxx"
lifecycleHooks:
postStart:
exec:
command:
- "bash"
- "-c"
- >
dir="/home/jovyan/.ssh"; [ -d $dir ] && { chmod 700 $dir && chmod -f 600 $dir/* && chmod -f 644 $dir/*.pub; } || true;
cp -t /home/jovyan /Acknowledgements.ipynb;
[[ -f $HOME/.bashrc ]] || cp /etc/skel/.bashrc $HOME/;
[[ -f $HOME/.profile ]] || cp /etc/skel/.profile $HOME/;
[[ -f $HOME/.bash_logout ]] || cp /etc/skel/.bash_logout $HOME/;
[[ -f $HOME/.condarc ]] || cp /.condarc $HOME/;
[ -d "/share" ] && [ ! -L ~/share ] && ln -s /share ~/share || true;

0 comments on commit 137c70e

Please sign in to comment.