Currently, these instructions only work with minikube but can be adapted to work with any other local kubernetes setup.
-
Download, set up and start minikube
-
Allow the spawned JupyterHub server pods to talk to the JupyterHub instance on your local machine with the following command:
# Linux sudo ip route add $(kubectl get node minikube -o jsonpath="{.spec.podCIDR}") via $(minikube ip) # MACOS sudo route -n add -net $(kubectl get node minikube -o jsonpath="{.spec.podCIDR}") $(minikube ip)
You can later undo the effects of this with the following command
# Linux sudo ip route del $(kubectl get node minikube -o jsonpath="{.spec.podCIDR}") # MACOS sudo route delete -net $(kubectl get node minikube -o jsonpath="{.spec.podCIDR}")
-
Clone this repository
-
Setup a virtual environment, in whatever way works for you (
venv
,conda
, etc) -
Install the packages specified in
dev-requirements.txt
python -m pip install -r dev-requirements.txt
-
Install the
jupyterhub-fancy-profiles
package itself.python -m pip install -e .
This also will build the JS and CSS assets.
-
Install configurable-http-proxy, as that is required for JupyterHub to run.
npm install configurable-http-proxy
-
Put
configurable-http-proxy
in$PATH
so jupyterhub can discover it.export PATH="$(pwd)/node_modules/.bin:${PATH}"
-
Now, start
jupyterhub
and go tolocalhost:8000
to access it! You can login with any username and password.jupyterhub
Troubleshooting: On MacOS, if you're seeing the error
Errno 8: Nodename nor servname provided
, try runningjupyterhub --ip=localhost
instead. -
If you're working on the JS / CSS, you can also run the following command in another terminal to automatically watch and rebuild the JS / CSS as you edit.
npm run webpack:watch