How to use Jupyter Notebook via JupyterHub

In this tutorial, you will learn how to use Jupyter Notebook via JupyterHub, and run an example code.


Step 1: Install JupyterHub and open the Notebook server

  • JupyterHub can be installed from the QTS App Center.
  • Launch and log in to JupyterHub.
  • Click the switch from Off to “On” to start the Notebook server.
  • The interface will appear as following:
  1. “Running”: Check started instances
  2. “Upload”: Upload local files to the server
  3. “New”: Open a new Notebook, terminal or folder
  4. “Admin”: Switch to the admin page (administrator accounts only)
  5. Sign out of Jupyter Notebook
  • If a Notebook is running, click “Running” to view the following page. You can also click “Shutdown” to close it.
  • Administrators can enter the “”Admin” page and access a user’s Notebook.


Step 2: Run example code

  • Choose “Jupyter_example” on the list.
  • Open “example.ipynb”.
  • A Python example code will be opened on a new Notebook.
    This program can train a Convolutional Neural Network via Keras, which is a high-level neural networks API, for handwritten digit recognition in MNIST dataset.
    For more information, visit:
  • The example code has been executed and saved. You can also run it again.
    • Click “Run” to execute a specific section or run it sequentially.
    • Click “Cell” and choose “Run All” to execute complete code.
    • For more Notebook tutorials, visit
  • The program does the following:
    • At the beginning, required libraries are imported.
      Import Keras libraries

      Import other Python libraries

    • Load MNIST dataset

      Randomly pick and check an image-label pair

    • Preprocess the training set
      Reshape and normalize training images

      One-hot encode training labels

    • Create a Sequential Model layer by layer
    • Use the Adam optimizer and choose categorical cross entropy as the objective function to train the model. The following part runs for a few seconds.
    • Evaluate the model using the test set. Although the accuracy on training set is higher than 99%, the accuracy on the test set may slightly decrease.
    • Finally the testing results are displayed.

Fore more tutorial, please refer to

Related posts

One thought on “How to use Jupyter Notebook via JupyterHub

  1. Can you say more about installing JupyterHub? I don’t see it in the QTS App Center. I have a TS-451 running firmware

Leave a Reply