pw vscode
pw vscode
Open VS Code connected to a remote resource
Synopsis
Open Visual Studio Code connected to a remote resource via SSH.
This configures VS Code's Remote-SSH extension to connect through the Parallel Works platform and launches VS Code.
Requires the code CLI on your PATH and the Remote-SSH extension installed in VS Code.
By default VS Code opens on the cluster's login node. To open it on a compute node instead, pick one of:
- --environment schedules a new worker on a compute environment and opens VS Code on its node once the scheduler starts it. Pass --param to set the environment's scheduling parameters, and run pw environments get to see which parameters it accepts.
- --worker opens on the node of a worker you already have, as listed by pw workers ls. This skips the queue.
- --node opens on a compute node by hostname.
Either way the resource stays the cluster, since the login node is the hop to the compute node.
A worker scheduled this way outlives the editor. Release it with pw workers delete when you are done.
pw vscode [flags] <resource> [path]Examples
pw vscode my-cluster
# Open VS Code in a specific directory
pw vscode my-cluster /home/user/project
# Open VS Code on another user's resource
pw vscode otheruser/their-cluster
# Schedule a compute node and open VS Code on it
pw vscode --environment gpu-large my-hpc
# Schedule with environment parameters
pw vscode --environment gpu-large --param numNodes=2 my-hpc
# Open VS Code on the compute node running a worker
pw vscode --worker 60c72b2f9b1e8d001c8e4f3a my-hpc
# Open VS Code on a compute node by hostname
pw vscode --node node-0002 my-hpcOptions
--environment string Schedule a new worker on this compute environment, by name or ID, and open on its node
-h, --help help for vscode
--node string Open on this compute node, by hostname
--param stringArray Scheduling parameter for --environment as key=value (repeatable)
--partition string Scheduler partition for a new worker, for use without --environment
--worker string Open on the compute node running this worker, by IDOptions inherited from parent commands
--context string The context to use. Overrides PW_CONTEXT environment variable and current context from config.
--platform-host string The Parallel Works ACTIVATE platform host to use. Will override any other platform host settings.
-v, --verbose Enable verbose loggingSEE ALSO
- pw - The Parallel Works ACTIVATE CLI