#!/bin/bash set -e # Ensure the data directory exists mkdir -p /srv/jupyterhub # If the DB doesn't exist, initialize it if [ ! -f /data/jupyterhub.sqlite ]; then echo "Initializing JupyterHub database..." fi # Run JupyterHub with DB in /data volume export JUPYTERHUB_DATA=/srv/jupyterhub exec jupyterhub -f /srv/jupyterhub/jupyterhub_config.py