Q Blocks Documentation
  • 👋Welcome to Q Blocks
  • 🌐GPU Computing at Scale
  • 💻Launch a Q Blocks GPU instance
    • Using Dashboard UI
    • Using Rest APIs
  • 💰GPU Instance Pricing
  • 🤖Fine-tuning Falcon 7B/40B LLM
  • 🔑IAM: Share access with team
  • 🤔Q Blocks How To Guide
    • Create a new user
    • Upload data using SCP command
    • Use Visual Studio Code with Q Blocks instances
    • Port forwarding to run web services
    • Launch Jupyter Hub in Q Blocks Instance
    • Launch TensorBoard in Q Blocks instance
    • Setup Horovod and OpenMPI in Q Blocks Instance
    • Setup AIM for ML experiment tracking
    • Disco Diffusion AI Art on Q Blocks
    • Stable Diffusion Text to Image GPU server on Q Blocks
    • Setup Docker with Nvidia GPU support
    • Enable port forwarding on a Docker container in Q Blocks instance
    • Run production ready lightweight kubernetes using K3s in Q Blocks instance
    • ↗️Upgrade CUDA to v12.2
Powered by GitBook
On this page
  • Follow the 2 step process:
  • Advanced Settings (Optional):
  • Steps to follow:
  1. Q Blocks How To Guide

Launch Jupyter Hub in Q Blocks Instance

PreviousPort forwarding to run web servicesNextLaunch TensorBoard in Q Blocks instance

Last updated 1 year ago

Setup Time: 5 minutes

Q Blocks instances offer Jupyter Lab access out of the box. It is great for quickly spawning up multiple notebooks, python console and terminal access within your browser. It also offers support for extensions that add superpowers to your notebooks.

However, there is another offering from the Jupyter community called as Jupyter Hub.

Unlike Notebooks or Lab, Jupyter Hub lets you have multiple user access.

If you are looking for extending access within your team to multiple users so they can have their isolated environments for running and managing notebooks then Hub is the best solution for you.

So, let’s get started!

Follow the 2 step process:

1. Install Jupyter Hub:

  • Run this command as qblocks user:

wget 'https://www.qblocks.cloud/resources/setup-jupyterhub.sh' --no-check-certificate -O - | bash

This script will install required dependencies and Jupyter hub software.

2. Launch Jupyter Hub:

  • See this on where to find Extra Port and Host information.

  • Run this command as qblocks user:

sudo jupyterhub --ip 0.0.0.0 --port EXTRA_PORT

EXTRA_PORT is the extra port shown under More info section of your instance.

Jupyter Hub Access:

Jupyter hub can be accessed at this URL:

http://HOST:EXTRA_PORT

Replace Host and Extra port with the values shown in More info section of your instance. See above mentioned guide to find Extra port and Host information.

Jupyter Hub URL can be shared across your team and each user account in your instance can access Jupyter Hub with their respective credentials.

Advanced Settings (Optional):

You may read further if you want to add an SSL certificate to access Jupyter Hub over HTTPS.

Jupyter Hub accepts a python configuration file in which you can specify all the necessary conditions like port mapping and security certificates.

Steps to follow:

  1. Generate or use an existing SSL certificate.

    • Store the certificate files in /home/qblocks/ as ssl.key and ssl.crt.

Please Note:

A self signed OpenSSL certificate may not be secure enough and we would recommend you to follow the industry standard practices to access your web services securely.

  1. Create a Jupyter Hub configuration file

  • Store this config file as /home/qblocks/jupyterhub_config.py:

Make sure to replace EXTRA_PORT with your instance’s extra port

# jupyterhub_config.py file
c = get_config()

import os
pjoin = os.path.join

# Allows multiple single-server per user
c.JupyterHub.allow_named_servers = True

c.JupyterHub.bind_url = 'http://0.0.0.0:EXTRA_PORT'

# https certificate setup
c.JupyterHub.ssl_key = '/home/qblocks/ssl.key'
c.JupyterHub.ssl_cert = '/home/qblocks/ssl.crt'
  1. Launch Jupyter Hub with configuration file:

sudo jupyterhub --config=/home/qblocks/jupyterhub_config.py

Visit https://HOST:EXTRA_PORT to access Jupyter Hub over https

See this section on .

If you don’t have an SSL certificate, it can be generated using OpenSSL ().

More info on Jupyter Hub config available .

If you still face issues setting it up then don't hesitate to reach out to us at:

🤔
guide
How to create a new user account in Q Blocks instance
example
here
support@qblocks.cloud