Jupyter.md 2.44 KB
Newer Older
Adam Caprez's avatar
Adam Caprez committed
1
+++
2
title = "Jupyter Notebooks"
Adam Caprez's avatar
Adam Caprez committed
3
4
description = "How to access and use a Jupyter Notebook"
weight = 20
Adam Caprez's avatar
Adam Caprez committed
5
hidden = "true"
Adam Caprez's avatar
Adam Caprez committed
6
7
+++

8
9
10
11
- [Connecting to JupyterHub](#connecting-to-jupyterhub)
- [Running Code](#running-code)
- [Opening a Terminal](#opening-a-terminal)
- [Using Custom Packages](#using-custom-packages)
Adam Caprez's avatar
Adam Caprez committed
12

13
## Connecting to JupyterHub
Adam Caprez's avatar
Adam Caprez committed
14
15
16
17
18
19
-----------------------
 Jupyter defines it's notebooks ("Jupyter Notebooks") as 
	an open-source web application that allows you to create and share documents that contain live code,
	equations, visualizations and narrative text. Uses include: data cleaning and transformation, numerical simulation,
	statistical modeling, data visualization, machine learning, and much more.

20
1.  To open a Jupyter notebook, go to the address of the cluster, below [Crane](crane.unl.edu) will be used as an example, sign in using your hcc credentials (NOT your 
Adam Caprez's avatar
Adam Caprez committed
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
	campus credentials).
{{< figure src="/images/jupyterLogin.png" >}}

2.	Select your preferred authentication method.

	{{< figure src="/images/jupyterPush.png" >}}  

3.	Choose a job profile. Select "Noteboook via SLURM Job | Small (1 core, 4GB RAM, 8 hours)" for light tasks such as debugging or small-scale testing.
Select the other options based on your computing needs. Note that a SLURM Job will save to your "work" directory.

{{< figure src="/images/jupyterjob.png" >}}

## Running Code

1.  Select the "New" dropdown menu and select the file type you want to create.   

{{< figure src="/images/jupyterNew.png" >}}
2.	A new tab will open, where you can enter your code. Run your code by selecting the "play" icon.

{{< figure src="/images/jupyterCode.png">}}

## Opening a Terminal

1.	From your user home page, select "terminal" from the "New" drop-down menu.
{{< figure src="/images/jupyterTerminal.png">}}
46
2.	A terminal opens in a new tab. You can enter [Linux commands]({{< relref "basic_linux_commands" >}})
Adam Caprez's avatar
Adam Caprez committed
47
48
49
50
51
52
53
54
55
56
57
58
59
 at the prompt.
{{< figure src="/images/jupyterTerminal2.png">}}

## Using Custom Packages

Many popular `python` and `R` packages are already installed and available within Jupyter Notebooks. 
However, it is possible to install custom packages to be used in notebooks by creating a custom Anaconda 
Environment. Detailed information on how to create such an environment can be found at
 [Using an Anaconda Environment in a Jupyter Notebook on Crane]({{< relref "/applications/user_software/using_anaconda_package_manager#using-an-anaconda-environment-in-a-jupyter-notebook-on-crane" >}}).

---