Integrating Thunder Compute with VSCode
This guide will walk you through integrating Thunder Compute with Visual Studio Code (VSCode), allowing you to develop and manage your projects directly on a Thunder Compute instance from your local IDE.
Prerequisites
- A Thunder Compute account
- Visual Studio Code installed
- A Thunder Compute instance created (see Step 1)
Steps
1. Create a Thunder Compute instance
First, create a Thunder Compute instance by following the steps in the Quickstart Guide.
2. Install the Remote - SSH extension
Install the Remote - SSH extension in VSCode. If you are using a different IDE, there likely exists a similar extension.
3. Add the Thunder Compute instance to Remote Explorer
Navigate to the Remote Explorer on the left sidebar in VSCode.
To add the Thunder Compute instance to Remote Explorer we must first manually connect to the Thunder Compute instance using the command:
$ tnr connect <instance_id>
For your first instance, <instance_id>
is 0
.
The $ tnr connect
command automatically adds the instance and its keypair to your .ssh
file. This instance should appear in the remote explorer with the name tnr-<instance_id>
.
Optionally, If the instance does not automatically appear, you can click the “plus” icon for “new remote” and use the command ssh <instance_public_ip>
to connect to the instance. You do not need to configure keys or username, as these are also stored in .ssh
.
Note: if the instance is stopped it will not appear in Remote Explorer. Use the command $ tnr start <instance_id>
to start it.
4. Connect to the Remote instance
In the Remote Explorer, select the new SSH target to connect.
Conclusion
You have successfully connected VSCode to your Thunder Compute instance. You can now develop as if you are locally attached to a virtual GPU.