You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(spaces-dev-mode): surface SSH command, lead with SSH over VS Code (#2488)
* docs(spaces-dev-mode): surface SSH command, lead with SSH over VS Code
SSH is the underlying connection mechanism — VS Code rides on top of it — but the page currently mentions VS Code first and tells readers to find the SSH instructions in the UI modal. Reframe the intro accordingly and show the actual `ssh <subdomain>@ssh.hf.space` command plus a snippet to fetch the subdomain via `HfApi.space_info()`, so anyone reading the docs (humans or agents) can connect without going through the UI.
* docs(spaces-dev-mode): drop Beta-stage warning
* docs(spaces-dev-mode): clarify SSH vs VS Code web servers
Copy file name to clipboardExpand all lines: docs/hub/spaces-dev-mode.md
+20-8Lines changed: 20 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,5 @@
1
1
# Spaces Dev Mode: Seamless development in Spaces
2
2
3
-
> [!WARNING]
4
-
> This feature is still in Beta stage.
5
-
6
3
> [!WARNING]
7
4
> The Spaces Dev Mode is part of <ahref="https://huggingface.co/pro">PRO</a> or <ahref="https://huggingface.co/enterprise">Team & Enterprise</a> plans.
8
5
@@ -14,7 +11,7 @@ Whenever your commit some changes to your Space repo, the underlying Docker imag
14
11
15
12
The Dev Mode allows you to update your Space much quicker by overriding the Docker image.
16
13
17
-
The Dev Mode Docker image starts your application as a sub-process, allowing you to restart it without stopping the Space container itself. It also starts a VS Code server and a SSH server in the background for you to connect to the Space.
14
+
The Dev Mode Docker image starts your application as a sub-process, allowing you to restart it without stopping the Space container itself. It also starts an SSH server (for local editors and terminals) and a VS Code server (for the in-product VS Code Web) in the background, so you can connect to the Space.
18
15
19
16
The ability to connect to the running Space unlocks several use cases:
20
17
@@ -39,16 +36,31 @@ The application does not restart automatically when you change the code. For you
39
36
You will need to manually run `pip install` from VS Code or SSH.
40
37
</div>
41
38
42
-
### SSH connection and VS Code
39
+
### Connecting
40
+
41
+
Dev Mode exposes the running Space as a standard SSH host. VS Code and any other editor connect through that same SSH endpoint.
42
+
43
+
#### SSH
44
+
45
+
Once Dev Mode is running, connect with:
43
46
44
-
The Dev Mode allows you to connect to your Space's docker container using SSH.
47
+
```shell
48
+
ssh <space-subdomain>@ssh.hf.space
49
+
```
45
50
46
-
Instructions to connect are listed in the Dev Mode controls modal.
51
+
The subdomain is shown in the Dev Mode controls modal. You can also retrieve it programmatically:
You will need to add your machine's SSH public key to [your user account](https://huggingface.co/settings/keys) to be able to connect to the Space using SSH.
49
59
Check out the [Git over SSH](./security-git-ssh#add-a-ssh-key-to-your-account) documentation for more detailed instructions.
50
60
51
-
You can also use a local install of VS Code to connect to the Space container. To do so, you will need to install the [SSH Remote](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-ssh) extension.
61
+
#### VS Code
62
+
63
+
You can also use a local install of VS Code to connect to the Space container. To do so, install the [Remote - SSH](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-ssh) extension and connect to the same `<space-subdomain>@ssh.hf.space` host.
0 commit comments