Setting up learning environment
nbgitpuller
Section titled “nbgitpuller”Open the terminal on your server (wsl to access bash if you’re on Windows) and run:
sudo /opt/tljh/user/bin/pip install nbgitpullerThis installs nbgitpuller which allows you to provide a one-click notebook setup for your students.
You’ll need to create a GitHub repo with your lesson notebooks. Then use the link generator to build URLs:
Fill in:
- JupyterHub URL:
http://<your-static-ip>, or your local domain - Git repo URL: your repo
- Branch:
main - File to open: e.g.
lesson1/intro.ipynb - Application: JupyterLab
It gives you a link like:
http://10.19.x.x/hub/user-redirect/git-pull?repo=https://github.com/yourorg/cs-lessons&urlpath=lab/tree/cs-lessons/lesson1/intro.ipynb&branch=mainSwitch default to JupyterLab
Section titled “Switch default to JupyterLab”sudo tljh-config set user_environment.default_app jupyterlabsudo tljh-config reload hubInstall curriculum packages
Section titled “Install curriculum packages”We’re using these packages for our courses. You may have different requirements.
sudo /opt/tljh/user/bin/pip install numpy matplotlib pandasWe also use rdkit for Chemistry molecule generation, which needs to be installed via Conda.
sudo /opt/tljh/user/bin/mamba install -c conda-forge rdkit