Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Student Guide to JupyterHub for Physisc70 at Brown
Welcome to your Getting Started Guide for JupyterHub. Your JupyterHub is designed to provide an environment to run Jupyter Notebooks for Python without the need to install any software or packages. JupyterHub is interacted with completely through a web browser. This service is a collaboration supported by various teams in CIS.
On the Brown JupyterHub, each user is provided their own persistent working directory and compute resource allocation unique from each other user. This means the environment you are provided is only accessible by yourself and CIS support staff.
Once connected to your server, you are provided an isolated workspace where you can write and run code. There are no time limit restrictions or specified lockout times, so please feel free to use your personal JupyterHub notebook server anytime you want and adhere to CCV's Computing Policies
The Jupyter Notebook is an interactive computing environment that enables users to author notebook documents that include:
Live code
Interactive widgets
Plots
Narrative text
Equations
Images
Video
Notebook documents contain the inputs and outputs of an interactive session as well as narrative text that accompanies the code but is not meant for execution. Rich output generated by running code, including HTML, images, video, and plots, is embedded in the notebook, which makes it a complete and self-contained record of a computation.
When you run the notebook web application on your computer, notebook documents are just files on your local filesystem with a .ipynb
extension. This allows you to use familiar workflows for organizing your notebooks into folders and sharing them with others.
Notebooks consist of a linear sequence of cells. There are four basic cell types:
Code cells: Input and output of live code that is run in the kernel
Markdown cells: Narrative text with embedded LaTeX equations
Heading cells: 6 levels of hierarchical organization and formatting
Raw cells: Unformatted text that is included, without modification, when notebooks are converted to different formats using nbconvert
Terminal sessions provide text-based/command-line access and interaction with the operating system. In an environment such as JupyterHub, users have a limited ability to graphically interact with the underlying operating system. The terminal session gives users the ability to work directly with the filesystem via a Unix-like shell. This is a very useful tool, and one that has applications for anyone working in any field related to technology. Therefore, it is often useful and necessary to have interactions via a terminal session.
Select the localFile Browser from left sidebar
Create a new launcher using the New Launcher button
Click the Terminal icon under the Other section
A new “Terminal #” window will appear your browser with a prompt similar to jovyan@jupyter-first-5flast:~$
In some browsers, when lunching a terminal, no text appears. If that is the case, visit Settings -> Terminal Theme -> Dark
To launch a Jupyter Notebook (.ipynb) file on your hub, you can simply double click on it to launch a kernel session with that notebook.
Select File browser from left sidebar
Locate the notebook you wish to open using the file browser
Double click or right click on the file and select Open
A new tab will launch containing your Notebook
JupyterLab is the next generation web-interface for Jupyter Notebooks. It enables you to use side by side view, text editors, terminals, data file viewers, markdown preview and other custom components along with notebooks. Highlighted features are:
Drag-and-drop to reorder notebook cells and copy them between notebooks.
Run code blocks interactively from text files (.py, .R, .md, .tex, etc.).
Link a code console to a notebook kernel to explore code interactively without cluttering up the notebook with temporary scratch work.
Edit popular file formats with live preview, such as Markdown, JSON, CSV, Vega, VegaLite, and more.
For more indept guides and videos about JupyterLab, please see the official documentation
File: actions related to files and directories
Edit: actions related to editing documents and other activities
View: actions that alter the appearance of JupyterLab
Run: actions for running code in different activities such as notebooks and code consoles
Kernel: actions for managing kernels, which are separate processes for running code
Hub: actions related to the hub such as shutdown or logout.
Tabs: a list of the open documents and activities in the dock panel
Settings: common settings and an advanced settings editor
Help: a list of JupyterLab and kernel help links
File Browser: Local file browser for JupyterHub. Not synced with Google Drive
Git Plugin Actions: View of files that have changed and an interface to git actions such as stage, commit, push and pull
Running Terminals and Kernels: List of active running kernels.
Command Palette: Keyboard-driven way to search for and run JupyterLab commands
Open Tabs: List of active notebook tabs and related functionality
Browser Window: Active browser window.
Git Clone: Add or clone a new repository
Notebook launcher: Available notebook kernels to launch.
Terminal launcher: Launch a new terminal window
Prior to accessing Brown’s JupyterHub, you will need the following:
A supported web browser (Chrome, Firefox, Safari, Microsoft Edge)
Be enrolled in a course at Brown that utilizes JupyterHub (ask your professor)
Have read through the Computing Policies Terms of Service Agreement
Start using JupyterHub by signing in to your account for your class.
Go to https://phys.jupyter.brown.edu and click "Sign in with Brown Gmail Login"
Enter your Brown email address (example: john_doe@brown.edu) and password
Once authenticated, you should automatically be logged in and a JupyterHub server will begin launching. A status bar will appear with detailed information regarding your server startup.
Once connected, you should arrive at the JupyterHub home page as seen below. For more information about the menu buttons and their functionality, see the Interface Overview documentation.
Future logins will automatically spawn any active notebooks automatically.
We hope you are enjoying Jupyter Hub. This is a pilot project, supported by Brown Computing Information Services (CIS). We are a small team at the moment and therefore support is somewhat limited. We have created few mediums for you to see assitance.
Please check the FAQ section in this book
For general usage questions, we encourage you to take advantage of the .
If you are experiencing technical issues, for instance, the Hub appears to be down or you have access issues, you can email ****
Your instructor will distribute Jupyter Notebooks via Canvas. In order to upload the notebook to your JupyterHub you must follow the following steps
Select File browser from left sidebar
Select the Upload Files button
Select the files you would like to upload and click Open
The files will be automatically added to your hub at your current working directory level.
You can perform standard actions on your notebook files by right clicking on any individual file or directory. This will provide a list of applicable actions via a drop down menu. Options include cut/copy/paste, rename, download, duplicate, delete, and shutdown kernel (stopping the specific notebook processes).
Notebook kernels actively running have a small green circle icon to the left of the filename indicating their status (as seen in the example provided).
Additionally, you can manually manage actively running notebook kernels and terminals by selecting the Running Terminals and Kernels sidebar option. This will provide a detailed list of all active notebooks with the ability to halt their processes by using the Shutdown button
Shutting down a notebook kernel does note delete any of its content or data, but simply halts all running code until it has been restarted.
Periodically a given notebook may begin to misbehave. This can be due to a poorly constructed segment of code, resource overflows, or other similar events. A common solution to these types of problems is to restart the notebook kernel, which will release any memory and variable states of the notebook and reload them. This can be done by selecting Kernel > Restart Kernel.
If you are experiencing poor performance or erratic behavior with a given notebook, it is typically a good first step to shutdown unused notebooks and restart the targeted notebook's kernel.
For new users of Python3, we have provided access to an introduction to Python3 notebook series. This can be added to your local JupyterHub drive by clicking on the following link: .
This link will automatically download the course content into you hub and then launch an instance. To run the provided exercises, follow the instructions below:
Click on . Wait for the download process to finish.
Select the localFile Browser from left sidebar
Click on the Home icon above your Browser region.
Navigate into learn-python3.git/notebooks
Select from the beginner or intermediate notebook lessons
Double click or right click > Open the desired notebook lesson.
These lessons are provided by a third party source and not property of Brown University. We are not responsible for maintaining, debugging, or updating these introductory material.
Python3 Official Documentation:
Jupyter Notebook Official Documentation:
Jupyter Lab Official Documentation:
There are two main reasons why you are unable to log into JupyterHub.
First, you may not have been approved to use the hub. If you are not actively enrolled in a class at Brown which is utilizing this service, then you will not have access to the Hub. Furthermore, if you previously had access and the class has since ended, permissions to the Hub are revoked at the end of semester.
Second, you may be trying to login with an unauthorized email address (not a @brown.edu login email). Please ensure you are using your Brown email address, and that you permitted to access the Hub.
If you believe you should have access to the Hub and don't, please contact us at jupyter-help@brown.edu
Resources on the Hub may be experiencing heavy load at the moment. We implement an auto-scaling of Hub resources when we detect the system is reaching capacity. If your server is taking a few moments to start, it is likely that the system is currently scaling up more resources, and this should only take a few minutes.
If your server continues to not launch after a few minutes, disconnect and attempt to connect again. If the issue persists, please contact us at jupyter-help@brown.edu
This means that your server has been halted and is rebooting. This may be because you were inactive for an extended period of time. If you experience this message, please wait a few moments and try to login again.
You may have several active notebooks running in the background which could be consuming resources. It is recommended you close any unused notebooks as seen in the instructions Managing Active Notebooks
If the notebook continues to run slow, we recommend you restart the notebooks kernel as seen in the Managing Active Notebooks.
First try restarting the notebook kernel as seen in the Managing Active Notebooks. If the issue persists, restart your server by following the instructions in Shutting Down Server.
This error happens when you are launching a notebook file from Google Drive which you do not have write permissions to. If you are using a notebook shared through Google Drive which you are not permitted to write to, please first copy the file to your personal Drive by right clicking on the file and selecting "Add to my Drive".
Yes, you can created files and run notebooks on the hub disk space, but they are not backed up. This means that if hub shuts down (for rolling restarts, system failures, etc), all the local data will be lost. We advice you use this at own risk as it is not an intended workspace for long-term notebooks.
Currently, the collaborate feature for notebooks has been disabled due to developmental reasons. You can share notebooks with other users the same way you would share any file on Google Drive, but they cannot be actively worked on by multiple users simultaneously.
Yes you can, but please remember that the Brown JupyterHub is for academic purposes only. You can use the upload feature within the JupyterHub, or simply upload it to your google drive externally and launch it from within the Hub.
The kernels supported are tailored to each class. Some environments have multiple supported kernels, while others only support Python 3
Ensure you are looking in the right drive folder where you saved it. Please follow the steps provided in the Launch an Existing Notebook.
Please feel free to contact us at jupyter-help@brown.edu with any questions/comments/concerns regarding anything JupyterHub.
Open Source Software
At times, the current release of JupyterHub/JupyterLab may have know issues. We list the here for you to be aware
In some browsers, when lunching a terminal, no text appears. If that is the case, visit Settings -> Terminal Theme -> Dark
Strange behavious are often seen when you leave your JupyterHub tab opens. for instance, it may enter an infinite loop of clonning your workspace!
Once you are done working, we recommend you manually close down your JupyterHub server by using the JupyterHub Control Panel. This will ensure your session is safely shutdown and the resources you were using are released back to the hub.
File > Hub Control Panel
Click Stop My Server.
This method is highly recommended as it stores the state of the machine prior to booting down. This means that the next time you connect to your server, any notebooks running will be automatically resumed.
Alternatively, if your server is timed out due to inactivity (ie: simply walking away from your live server), we cannot guarantee automatic notebook booting upon your next login.
Manually shutting down your sever is the recommended best practice procedure for when you are done working on your server.
Notebooks created and stored on Brown's JupyterHub will persist between logins, but will not have any long-term redundant backups . Should you lose permissions to access the hub (i.e., end of semester), or should the hub crash, these files may be lost. To back up your Notebooks, please download them to your local hard drive or push them to GitHub.
To create a notebook on JupyterHub, follow the instructions below:
Select the localFile Browser from left sidebar
Create a new launcher using the New Launcher button
Click Python 3 under the Notebook section
A new “Unititled(#).ipynb” file will appear in your current working drive directory and a blank Notebook will launch. Click on "Untitled" to change the name of the file