Web-based teaching
When I started my PhD, almost two years ago, I didn’t know what a Jupyter notebook was, I had never heard of Docker, the Nectar research cloud, or github. After a frenetic ride on this digital rollercoaster, I was able to help deliver a training course last week that assembled all of these crucial components of open, reproducible computational research - a concept we call the web notebook server.
When students sat down for the VIEPS Introduction to Python Course, they used DIT4C as a web-interface to launch Docker containers on the Nectar Cloud.

The docker images we were using included a beefed-up Scientific Python so we could introduce Python’s great mapping capability.
So far so good, we had a class of 26 all with the identical software suite, all running on reliable Nectar infrastructure. As usual the docker containers were by default running Jupyter notebook servers, as our preferred environment for teaching Python.
But what was really novel is that the default address for the Jupyter webserver was not pointing at the notebook port, but at a static website we built into the Docker image. Thus website contains all of the course content, navigation, access to Jupyter notebooks, the shell, etc. Here’s the Docker magic:
jupyter notebook --port=$port --ip=0.0.0.0 --no-browser --NotebookApp.default_url="/files/www/index.html"
At this point it might be useful to take a peek at what the website looked like to a novice Pythonista:

The static website gets built by MkDocs. Like many static site generators it is able to make simple web content from even simpler source content - in this case it renders markdown as HTML.
So did it work? Well, on the whole yes. We pushed our resources a little too hard, running expensive mapping functions. But the result was great output, like this map of global plate motion vectors and strain rate made with Cartopy (see here for a description):

Why would you do this? Well, what we demonstrated is that we can run a workshop style course, all from a single webpage, served from a Nectar VM, and with seamless links to the Jupyter notebook, shell and filebrowser environments. And you can do this without being a web aficionado.
At the heart of this approach is the simple convenience that Course notes sit alongside the Python machinery for putting the ideas into practice. Moreover, you can provide participants with a complex scientific software stack built and archived through Docker
Everything you need to build the VIEPS Introduction to Python course can be found here. Please get in touch if you would like to develop a similar project, or use DIT4C to provision a project like this. We can also provide access to a limited number of containers for anyone interested in checking out the course.
The web notebook server concept was created by Louis Moresi with help from Dan Sandiford. Tim Dettrick provided invaluable assistance in integrating the project with DIT4C.
