[PYTHON] How to use Jupyter on the front end of supercomputer ITO

In Supercomputer ITO, Front End By using / system / ITO / frontend /), you can interactively perform large-scale work in a relatively long time, which cannot be done with a login node. Resources to be used in advance are available from the front-end reservation system (Japanese environment, [English Make a reservation at Environment). Log in to the front-end node via the login node using SSH agent forwarding and X11 forwarding with the assigned Floating IP. When making a reservation, select an option according to the hardware, usage pattern, and contract conditions. The minimum usage time that can be reserved is 4 hours, and the maximum usage time is 7 days. It takes an hour or two to prepare the system, so you need to make a reservation with plenty of time. Floating IP will be notified by email. Here is an example of connecting from Chrome to the front end Jupyter (Jupyter Notebook or JupyterLab) using MobaXterm of the client (Windows 10 Pro). It is based on the Official Guide.

Preparation: Enable SSH agent

Click Settings-> Configuration-> SSH in MoberXterm. Check ʻUse internal SSH agent "MobAgent" of SSH agentsat the bottom, click the+ mark to the right of the box below it, and enter the private key (extension is ppk). ) Add and click ʻOK button (ʻOK button). In addition, it is a good idea to check SSH keepalive in Settings-> Configuration-> SSH` of MobaXterm to prevent SSH from being cut off due to timeout. These tasks need to be done only once.

procedure

The Floating IP sent by email is different each time, but it is an IP address such as 172.18.32.191. In the following, this will be read as Floating_IP.

Ssh login from login node to frontend node

At the terminal of the login node, log in to the front-end node. If all you have to do is log in to the frontend node, this is the end of the procedure.

$ ssh -A -Y Floating_IP
# Floating_IP is emailed, 172.18.32.An IP address such as 191.

Start Jupyter on the frontend node

On the logged-in front-end node, start Jupyter (--no-browser) without launching the browser.

#For Jupyter Notebook
$ jupyter notebook --ip=127.0.0.1 --port=8888 --no-browser
#For JupterLab
$ jupyter lab --ip=127.0.0.1 --port=8888 --no-browser

As a result, the following display will appear near the end. Copy and paste this part into the URL of the client browser later.

http://127.0.0.1:8888/?token=...

Build an access route to Jupyter with local port forwarding

Click + next to the MobaXterm tab to open a new terminal. This is called a local terminal. In this local terminal do the following:

ssh -o ProxyCommand='ssh -W %h:%p %[email protected]' Floating_IP -l m00000a -L 8888:localhost:8888
# Floaint_IP is emailed, 172.18.32.An IP address such as 191.
#m00000a is a user account.

After waiting for a while, the supercomputer terminal will appear, so wait until then.

Access the above URL in the client browser

Paste the URL (http://127.0.0.1:8888/?token=...) that appeared when you started Jupyter on the frontend node into the URL of the client browser (for example, Chrome on Windows). Access. Jupyter will now appear in the client's browser. Note: When copying a URL with MobaXterm, just select the URL with the mouse. Not Ctrl-C.

Recommended Posts

How to use Jupyter on the front end of supercomputer ITO
Steps to run TensorFlow 2.1 from Jupyter on supercomputer ITO front end (with GPU)
Jupyter Notebook Basics of how to use
A memo of how to use AIST supercomputer ABCI
How to use the decorator
How to use Jupyter Notebook
[Hyperledger Iroha] Notes on how to use the Python SDK
How to see the contents of the Jupyter notebook ipynb file
Notes on how to use marshmallow in the schema library
How to use the zip function
How to use the optparse module
Summary of how to use pandas.DataFrame.loc
How to use Dataiku on Windows
Notes on how to use pywinauto
Summary of how to use pyenv-virtualenv
How to use homebrew on Debian
Notes on how to use doctest
Summary of how to use csvkit
How to use the ConfigParser module
How to use machine learning for work? 01_ Understand the purpose of machine learning
How to update the python version of Cloud Shell on GCP
[Python] Summary of how to use pandas
How to use the Spark ML pipeline
How to check the version of Django
How to use mecab, neologd-ipadic on colab
[Linux] How to use the echo command
How to calculate Use% of df command
How to use Google Assistant on Windows 10
Memorandum on how to use gremlin python
Display the graph of tensorBoard on jupyter
[Python2.7] Summary of how to use unittest
How to use jupyter notebook with ABCI
Basics of PyTorch (1) -How to use Tensor-
How to use the IPython debugger (ipdb)
Summary of how to use Python list
[Python2.7] Summary of how to use subprocess
How to use Jupyter notebook [Super Basic]
[Question] How to use plot_surface of python
From the introduction of GoogleCloudPlatform Natural Language API to how to use it
How to easily switch the virtual environment created by Conda on Jupyter
Understand how to display images on Jupyter (utilization of imshow / matplotlib of OpenCV)
[C language] How to use the crypt function on Linux [Password hashing]
How to calculate the volatility of a brand
How to use the C library in Python
How to use folium (visualization of location information)
A simple example of how to use ArgumentParser
How to find the area of the Voronoi diagram
How to use MkDocs for the first time
[Python] How to use two types of type ()
How to make multiple kernels selectable on Jupyter
How to use Python Kivy ④ ~ Execution on Android ~
Use the latest version of PyCharm on Ubuntu
Not much mention of how to use Pickle
How to use the graph drawing library Bokeh
Summary of how to use MNIST in Python
Use AppSync on the front and back ends
How to use the Google Cloud Translation API
How to use the NHK program guide API
Connect to Supercomputer ITO Jupyter from client browser
[Algorithm x Python] How to use the list
I want to use Python in the environment of pyenv + pipenv on Windows 10