Jupyter Notebooks: Difference between revisions

From RCSWiki
Jump to navigation Jump to search
Line 39: Line 39:
The compute node '''cn026''', was allocated to the job.
The compute node '''cn026''', was allocated to the job.


Load a python software module you want to use and start a '''jupyter notebook''' server.
Before starting the notebook we have to unset the '''XDG_RUNTIME_DIR''' variable,
otherwise the notebook crashes.
<pre>
$ module load python/anaconda3-2018.12
$ unset XDG_RUNTIME_DIR


<pre>
$ $ jupyter notebook --no-browser --ip=0.0.0.0


[I 16:04:31.618 NotebookApp] JupyterLab extension loaded from /global/software/anaconda/anaconda3-2018.12/lib/python3.6/site-packages/jupyterlab
[I 16:04:31.618 NotebookApp] JupyterLab application directory is /global/software/anaconda/anaconda3-2018.12/share/jupyter/lab
[I 16:04:31.621 NotebookApp] Serving notebooks from local directory: /home/drozmano
[I 16:04:31.621 NotebookApp] The Jupyter Notebook is running at:
[I 16:04:31.621 NotebookApp] http://(cn0526 or 127.0.0.1):8888/?token=bedfe1920e97a309c583a5f2895cf1367e37a7dac416494b
[I 16:04:31.621 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 16:04:31.673 NotebookApp]
   
    To access the notebook, open this file in a browser:
        file:///home/drozmano/.local/share/jupyter/runtime/nbserver-25483-open.html
    Or copy and paste one of these URLs:
        http://(cn0526 or 127.0.0.1):8888/?token=bedfe1920e97a309c583a5f2895cf1367e37a7dac416494b
</pre>
</pre>

Revision as of 22:06, 29 April 2020

General

Jupyter Hub on ARC

There is a Jupyter Hub attached to the ARC cluster. One must have an ARC account first, to connect to the hub.

Currently supports python3 only.

Connections are only available for computers that are part of the UofC campus network. To connect from outside of the UofC campus network, please use the Fort VPN client to connect to the campus network, first.

Compute Canada Jupyter Hub for UofC

Hosted by Compute Canada for UofC. Login with your UofC credentials.

Supports python2, python3, julia, and R.

Running a jupyter notebook on ARC's compute node

Start an interactive job on ARC:

$ salloc -N 1 -n 1 -c 12 --mem=0 -t 3:00:00 -p parallel
    salloc: Granted job allocation 5486616
    salloc: Waiting for resource configuration
    salloc: Nodes cn0526 are ready for job
    [drozmano@cn0526 ~]$ 

The command requested a 3 hours interactive job on the Parallel partition. The request includes all 12 CPUs and all the 23GB of RAM on the compute node. The compute node cn026, was allocated to the job.

Load a python software module you want to use and start a jupyter notebook server. Before starting the notebook we have to unset the XDG_RUNTIME_DIR variable, otherwise the notebook crashes.

$ module load python/anaconda3-2018.12
$ unset XDG_RUNTIME_DIR

$ $ jupyter notebook --no-browser --ip=0.0.0.0

[I 16:04:31.618 NotebookApp] JupyterLab extension loaded from /global/software/anaconda/anaconda3-2018.12/lib/python3.6/site-packages/jupyterlab
[I 16:04:31.618 NotebookApp] JupyterLab application directory is /global/software/anaconda/anaconda3-2018.12/share/jupyter/lab
[I 16:04:31.621 NotebookApp] Serving notebooks from local directory: /home/drozmano
[I 16:04:31.621 NotebookApp] The Jupyter Notebook is running at:
[I 16:04:31.621 NotebookApp] http://(cn0526 or 127.0.0.1):8888/?token=bedfe1920e97a309c583a5f2895cf1367e37a7dac416494b
[I 16:04:31.621 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 16:04:31.673 NotebookApp] 
    
    To access the notebook, open this file in a browser:
        file:///home/drozmano/.local/share/jupyter/runtime/nbserver-25483-open.html
    Or copy and paste one of these URLs:
        http://(cn0526 or 127.0.0.1):8888/?token=bedfe1920e97a309c583a5f2895cf1367e37a7dac416494b