Connecting to a Notebook Instance Through VS Code
VS Code is a typical code editor that supports multiple programming languages and development environments. You can connect to and use Jupyter Notebook through VS Code.
After creating a notebook instance with remote SSH enabled, you can use VS Code to access the development environment in any of the following ways:
- Using VS Code Toolkit to Connect to a Notebook Instance
In this mode, log in to the ModelArts VS Code Toolkit plug-in and use it to connect to an instance.
- Manually Connecting to a Notebook Instance Through VS Code
In this mode, use the VS Code Remote-SSH plug-in to configure connection information and connect to an instance.
Installing VS Code
When connecting to the development environment using VS Code, you must first install VS Code. The recommended VS Code versions, constraints, and installation guide are as follows.
- Recommended VS Code versions and constraints
- VS Code 1.86: No current constraints. Figure 1 Download location for VS Code version 1.86
- VS Code 1.109.5
- The image used by the notebook instance requires GLIBC ≥ 2.28.
You can run the ldd --version command to check the GLIBC version. For example, the Ubuntu 18.04 image has GLIBC < 2.28, which means it can only use VS Code 1.86 or lower.
- The notebook instance must connect to the internet.
If the notebook instance does not have internet access, you are advised to use VS Code 1.86. If you need to use VS Code 1.109.5, you must manually install the VS Code Server package. For details, see How Do I Install the VS Code Server of the Local VS Code Version Offline in a Notebook Instance?
Figure 2 Download location for VS Code version 1.109.5
- The image used by the notebook instance requires GLIBC ≥ 2.28.
- VS Code 1.86: No current constraints.
- VS Code installation guide:
In Windows, double-click the installation package to complete the installation.
In a Linux system, execute the command sudo dpkg -i <VS-Code-package-name> to perform the installation.
For example, if the VS Code installation package name is code_1.86.2-1707854558_amd64.deb, the command example is as follows:
sudo dpkg -i code_1.86.2-1707854558_amd64.deb
Linux system users must install VS Code as a non-root user.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot