Intro to JupyterHubs
Log into the JupyterHub
Go to https://nmfs-openscapes.2i2c.cloud/. Click “Login to continue”. You will be asked to log in with your GitHub Account, if you are not logged in already.
Image type: Python or R
Next you select your image type from the drop-down. The default is a geospatial image with Python and R.
Virtual Machine size
You’ll see a dropdown that allows you to choose the size of virtual machine. For the tutorials, you will only need the smallest virtual machine. Please only choose the large machines if you run out of RAM as the larger machines cost us more.
Start up
After we select our server type and click on start, JupyterHub will allocate our instance using Amazon Web Services (AWS). This may take several minutes.
Open RStudio
When you are in the Jupyter Lab tab (note the Jupyter Logo), you will see a Launcher page. If you don’t see this, go to File > New Launcher.
- Open RStudio by clicking on the “RStudio” box in the Launcher tab:
End your session
When you are finished working for the day it is important to log out of the JupyterHub. When you keep a session active it uses up AWS resources (costs money) and keeps a series of virtual machines deployed.
You log out from the Jupyter Lab tab not the RStudio tab.
From the Jupyter Lab tab, do one of two things to stop the server:
- Log out File -> Log Out and click “Log Out”!
- or File -> Hub Control Panel -> Stop My Server
Can’t find the Jupyter Lab tab? Go to https://nmfs-openscapes.2i2c.cloud/hub/home
Restart your server
Sometimes the server will crash/stop. This can happen if too many people use a lot of memory all at once. If that happens, go to the JupyterLab tab and then File -> Hub Control Panel -> Stop My Server and then Start My Server. You shouldn’t lose your work unless you were uploading a file.
Your files
When you start your server, you will have access to your own virtual drive space. No other users will be able to see or access your files. You can upload files to your virtual drive space and save files here. You can create folders to organize your files. You personal directory is home/jovyan
. Everyone has the same home directory but your files are separate and cannot be seen by others.
There are a number of different ways to create new files. We will practice this in the RStudio lecture.
Will I lose all of my work?
Logging out will NOT cause any of your work to be lost or deleted. It simply shuts down some resources. It would be equivalent to turning off your desktop computer at the end of the day.
*Python users
You can open a Jupyter Notebook by clicking on the “Python 3” box. In the Launcher tab:
Get an overview of Jupyter Lab: Intro to Jupyter Lab
FAQ
Why do we have the same home directory as /home/jovyan? /home/jovyan is the default home directory for ‘jupyter’ based images/dockers. It is the historic home directory for Jupyter deployments.
Can other users see the files in my /home/jovyan folder? No, other users can not see your files.
Acknowledgements
Some sections of this document have been taken from hackweeks organized by the University of Washington eScience Institute and Openscapes.