diff --git a/docs/docs/concepts/dev-environments.md b/docs/docs/concepts/dev-environments.md
index d946e539b..c4bb01565 100644
--- a/docs/docs/concepts/dev-environments.md
+++ b/docs/docs/concepts/dev-environments.md
@@ -5,7 +5,7 @@ description: Provisioning remote instances for cloud-based development
# Dev environments
-A dev environment lets you provision an instance and access it with your desktop IDE.
+A dev environment lets you provision an instance and access it with your desktop IDE or SSH.
??? info "Prerequisites"
Before running a dev environment, make sure you’ve [installed](../installation.md) the server and CLI, and created a [fleet](fleets.md).
@@ -25,6 +25,8 @@ name: vscode
python: "3.11"
# Uncomment to use a custom Docker image
#image: huggingface/trl-latest-gpu
+
+# Comment if not required
ide: vscode
# Uncomment to leverage spot instances
@@ -55,12 +57,32 @@ Launching `vscode`...
To open in VS Code Desktop, use this link:
vscode://vscode-remote/ssh-remote+vscode/workflow
+
+To connect via SSH, use: `ssh vscode`
```
`dstack apply` automatically provisions an instance and sets up an IDE on it.
+??? info "SSH-only"
+ The `ide` property is optional. If omitted, no IDE is pre-installed, but the dev environment
+ is still accessible via SSH:
+
+
+
??? info "Windows"
On Windows, `dstack` works both natively and inside WSL. But, for dev environments,
it's recommended _not to use_ `dstack apply` _inside WSL_ due to a [VS Code issue](https://github.com/microsoft/vscode-remote-release/issues/937).
diff --git a/frontend/src/locale/en.json b/frontend/src/locale/en.json
index 2436f64f5..ae5144acc 100644
--- a/frontend/src/locale/en.json
+++ b/frontend/src/locale/en.json
@@ -517,7 +517,7 @@
"name_constraint": "Example: 'my-fleet' or 'default'. If not specified, generated automatically.",
"name_placeholder": "Optional",
"ide": "IDE",
- "ide_description": "Select which IDE would you like to use with the dev environment.",
+ "ide_description": "Optionally select an IDE to pre-install in the dev environment.",
"docker": "Docker",
"docker_image": "Image",
"docker_image_description": "A Docker image name, e.g. 'lmsysorg/sglang:latest'",
diff --git a/frontend/src/pages/Runs/Details/RunDetails/ConnectToRunWithDevEnvConfiguration/index.tsx b/frontend/src/pages/Runs/Details/RunDetails/ConnectToRunWithDevEnvConfiguration/index.tsx
index ad2c13fb5..ec5444c66 100644
--- a/frontend/src/pages/Runs/Details/RunDetails/ConnectToRunWithDevEnvConfiguration/index.tsx
+++ b/frontend/src/pages/Runs/Details/RunDetails/ConnectToRunWithDevEnvConfiguration/index.tsx
@@ -44,8 +44,11 @@ export const ConnectToRunWithDevEnvConfiguration: FC<{ run: IRun }> = ({ run })
const configuration = run.run_spec.configuration as TDevEnvironmentConfiguration;
const latestSubmission = run.jobs[0]?.job_submissions?.slice(-1)[0];
const workingDir = latestSubmission?.job_runtime_data?.working_dir ?? '/';
- const openInIDEUrl = `${configuration.ide}://vscode-remote/ssh-remote+${run.run_spec.run_name}${workingDir}`;
- const ideDisplayName = getIDEDisplayName(configuration.ide);
+ const hasIDE = !!configuration.ide;
+ const openInIDEUrl = hasIDE
+ ? `${configuration.ide}://vscode-remote/ssh-remote+${run.run_spec.run_name}${workingDir}`
+ : undefined;
+ const ideDisplayName = hasIDE ? getIDEDisplayName(configuration.ide!) : undefined;
const [configCliCommand, copyCliCommand] = useConfigProjectCliCommand({ projectName: run.project_name });
@@ -210,52 +213,82 @@ export const ConnectToRunWithDevEnvConfiguration: FC<{ run: IRun }> = ({ run })
),
isOptional: true,
},
- {
- title: 'Open',
- description: `After the CLI is attached, you can open the dev environment in ${ideDisplayName}.`,
- content: (
-
-
+ hasIDE
+ ? {
+ title: 'Open',
+ description: `After the CLI is attached, you can open the dev environment in ${ideDisplayName}.`,
+ content: (
+
+
-
-
-
-
- {sshCommand}
+
+
+
+
+ {sshCommand}
-
-
- {t('common.copied')}
-
- }
- >
-
-
-
-
-
-
- ),
- isOptional: true,
- },
+
+
+ {t('common.copied')}
+
+ }
+ >
+
+
+
+
+
+
+ ),
+ isOptional: true,
+ }
+ : {
+ title: 'Connect via SSH',
+ description: 'After the CLI is attached, you can connect to the dev environment via SSH.',
+ content: (
+