This README will walk you through deploying JupyterHub on the Nova kubernetes cluster, for the purpose of running code notebooks for ML/AI model development.
config.yaml
contains all of the Helm values necessary for deployment.
Please review them to confirm that they meet your needs.
Add the JupyterHub helm chart repository
helm repo add jupyterhub https://hub.jupyter.org/helm-chart/
helm repo update
Install the helm chart, changing <NAMESPACE>
to your namespace of choice and <RELEASE NAME>
to a unique helm release name:
helm upgrade --cleanup-on-fail \
--install <RELEASE NAME> jupyterhub/jupyterhub \
--namespace <NAMESPACE> \
--create-namespace \
--version=3.3.8 \
--values config.yaml
- Open a separate terminal on your desktop
- Use ssh to port forward a connection to your k8s cluster. This may look like
ssh -D 1080 -q -N <user>@<cluster_address>
- Leave the terminal open while using JupyterHub (see next sections)
K9s (note the "9" rather than "8") is a neat command-line tool for managing your Kubernetes cluster resources without typing out long kubectl commands. We find k9s to be a convenient tool for tasks like this one: getting a helm chart deployed, monitoring its status, and port-forwarding relevant services to your local computer. Please note that k9s connects to your cluster using your kubeconfig files. If you have not yet configured your kubeconfig, please contact your cluster administrator for access.
- Install k9s
- Run
k9s
in your terminal to launch k9s - Type
:ns
, then hit enter to list the namespaces on your kubernetes cluster - Navigate using your arrow keys, and select the "jupyterhub" namespace by hitting enter. You will see a list of pods in your selected namespace.
- View Service resources in the current namespace by typing
:Service
and hitting enter - Use the arrow keys to hover over the "proxy-public" service
- Port-forward a the service using the shortcut Shift + F and navigating the popup using your arrow keys and enter.
- The service (in this case JupyterHub) will be accessible in your web browser at your chosen port, e.g. http://localhost:8000
- Log in with username
admin
, passwordadmin
- Choose the pytorch container from the list
- Create or download (e.g. this one) a code notebook that utilizes pytorch to train an AI/ML model
- The notebook runs!