Skip to content
| Marketplace
Sign in
Visual Studio Code>Data Science>LocalGPUNew to Visual Studio Code? Get it now.
LocalGPU

LocalGPU

Cumin AI

|
131 installs
| (0) | Free
A VS Code extension to connect to a GPU via SSH and run Jupyter notebooks.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

LocalGPU VS Code Extension

LocalGPU is a Visual Studio Code extension designed to seamlessly connect your local or cloud-based GPU to Jupyter notebooks within the VS Code environment. With this extension, you can execute Python and machine learning code on a remote GPU by simply providing an SSH connection to the remote server. The extension automates the process of setting up Jupyter on the remote machine for local access.


Features

  • Remote GPU Access: Connect your VS Code environment to any remote GPU via SSH.
  • Automated Jupyter Setup: The extension automatically sets up Jupyter on the remote server if it’s not already installed.
  • Seamless Execution: Execute Jupyter notebooks on a remote server while interacting with them locally in VS Code.

Prerequisites

Before using the LocalGPU extension, ensure you have the following:

  1. Visual Studio Code installed on your local machine.
  2. Jupyter Extension for VS Code (ms-toolsai.jupyter).
  3. A remote server (local machine, cloud GPU, or on-premise server) that has SSH enabled.
  4. The SSH login credentials to the remote server.
  5. Python and Jupyter installed on the remote machine. If not, the plugin will install them for you.

Installation

  1. Install the LocalGPU Extension:
    • Open Visual Studio Code.
    • Navigate to the Extensions tab (or press Ctrl+Shift+X).
    • Search for localGPU and install the extension.

How to Use

Step 1: Connect to Remote GPU

  1. Press Ctrl+Shift+P to open the Command Palette in VS Code.

  2. Type LocalGPU: Connect GPU and select it from the list.

  3. Enter your SSH command in the prompt. The format should be:

    ssh <user>@<remote-server-address> -p <port-number>
    

    Example:

    ssh ubuntu@192.168.1.100 -p 22
    
  4. Once the command is entered, the extension will attempt to connect to the remote server. If successful, it will show a notification:

    Connected to GPU successfully.
    

Step 2: Access Jupyter Notebooks Locally

After Jupyter is set up and the server is running:

  1. Open a new Jupyter notebook in VS Code.
  2. You should see a Local GPU Server as a kernel option in the Jupyter notebooks.
  3. Select the kernel to run all your Jupyter cells on the connected remote GPU.

Troubleshooting

Connection Issues

  • If you see the message Failed to connect to GPU, ensure that:
    • The SSH server is running on the remote machine.
    • The SSH port (usually 22) is open and accessible.
    • You have the correct username, password, or key file for authentication.

FAQs

1. How do I know if my GPU is connected?

Once connected, you will receive a notification in VS Code. You can also verify the connection by running a command in a Jupyter notebook cell and ensuring that the kernel is connected to the Local GPU Server.

2. What happens if the remote port is already in use?

please kill the process running on your local 8888 port.


Contributing

Contributions are welcome! To contribute:

  1. Fork the repository.
  2. Create a feature branch.
  3. Commit your changes.
  4. Push the branch and create a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for more information.


By using LocalGPU, you can easily leverage the power of remote GPUs for your Jupyter notebooks within the VS Code environment. Happy coding! 🚀

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft