Using the Jupyter Hub Server to Run Code on a GPU

University of Stirling, Computing Science and Mathematics

Introduction

The machine that we call Pin has 4 GPUs that staff and students can use to run machine learning experiments. It will run your Python programs and has most of the modules you would expect already installed, such as numpy, openCV and, of course, tensorflow 2 - the one with Keras built in.

How Do I Access it?

Pin runs Jupyter notebooks and the easiest way to get started is to run your Python in a notebook via a web browser. Point your web browser at:

jupyter.cs.stir.ac.uk

and enter your CSM credentials. The file listing you see is the root folder of your CSM store (most probably your H: drive). Make a folder to keep all your notebooks in. Call it jupyter or something. Put your jupyter notebook .ipynb files there and run them using Jupyter hub in the browser.

Here is a nice introduction to Jupyter notebooks if you need one:

https://www.codecademy.com/articles/how-to-use-jupyter-notebooks

Where Should I Store My Data?

If your dataset is small, you can keep it on your H: drive. If the dataset is large, it is better to keep it on Pin so that you are not moving it across a network when you want to load it. There is a folder called /datasets on Pin and it already has some common datasets stored in it. If you want to work on those datasets, get them from here. If there is a large dataset you want to download, ask CSG to download it directly to Pin - it will be quicker and it will be stored in the right place for you. If you think other people will find the dataset useful, ask for it to be put in the datasets folder. If it is private, ask for a folder of your own.

Currently, Pin has the following datasets:

Sounds Great. Can I See Some Example Code?

Yes you can. Here are some notebooks you can download and run on Pin. Put them in a folder on your H: drive and select that folder in Jupyter hub. Then click on the file to open it in a new notebook.

Here are some links you might find useful

Kevin Swingler July 2020.