HyperAIHyperAI

Remotely Connect to Running Jupyter

In Connecting to Running Jupyter via SSH, we introduced the method of connecting to running Jupyter through the SSH protocol. In addition, the Jupyter service in HyperAI can also be directly connected via the Jupyter Server URL. This allows local .ipynb files to use the Python environment and GPU resources in HyperAI.

Remotely Connect to HyperAI Jupyter Server in VS Code

  1. The Jupyter plugin needs to be installed.

  2. Open the "Command Palette" and select "Jupyter: Specify Connection to Local or Remote Jupyter Server"

  3. Click "Existing":

  4. Click "Copy Link" on the running container page to copy the Jupyter Server link.

  5. Paste the link into the dialog box in the VS Code command palette. You need to delete the part after the container ID, otherwise the connection will fail. Then reload the page as prompted.

The obtained link is:

https://app.hyper.ai/jobs/aisensiy/jobs/iay6ih7xrgal/lab/tree/home

You need to delete the part after the ID:

https://app.hyper.ai/jobs/aisensiy/jobs/iay6ih7xrgal
  1. Create a test.ipynb file in VS Code, enter the content shown in the image below, and click execute. You will be prompted to select a kernel - just select the default suggested kernel.

Remotely Connect to HyperAI Jupyter Server in PyCharm

Connect to Jupyter Server

  1. Create a Python project locally and create a test.ipynb file under the project. After opening the file, click the top area and select "Configure Jupyter Server...".

  2. In the pop-up window, select "Configured Server" and click "Copy Link" from the running container page to copy it here. You need to delete the part after the container ID, otherwise the connection will fail.

The link obtained from the above image is:

https://app.hyper.ai/jobs/aisensiy/jobs/iay6ih7xrgal/lab/tree/home

You need to delete the part after the ID:

https://app.hyper.ai/jobs/aisensiy/jobs/iay6ih7xrgal
  1. Create a new code cell and test whether the connection is successful.

Enable Auto-completion

After establishing the Jupyter server connection, you'll find that there is actually no syntax checking or auto-completion. You need to add a remote interpreter according to the documentation Configure an interpreter using SSH. The video mentioned above contains detailed steps.