Skip to content

Commit 262c98e

Browse files
committed
images + VS Code / SSH instructions
1 parent 6b5e0e3 commit 262c98e

File tree

1 file changed

+27
-11
lines changed

1 file changed

+27
-11
lines changed

docs/hub/spaces-dev-mode.md

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@ Overall it makes developing and experimenting with Spaces much faster by skippin
2929

3030
Once the Dev Mode is enabled on your Space, you should see a modal like the following.
3131

32-
<img src="https://cdn-uploads.huggingface.co/production/uploads/5f17f0a0925b9863e28ad517/wSfCELm8WoY_EFhj8l1MM.png" style="max-width: 500px;">
32+
<div class="flex justify-center" style="max-width: 550px">
33+
<img class="block dark:hidden !m-0" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/spaces-dev-mode/dev-mode-controls.png" alt="screenshot of the dev mode controls interface."/>
34+
<img class="hidden dark:block !m-0" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/spaces-dev-mode/dev-mode-controls-dark.png" alt="screenshot of the dev mode controls interface."/>
35+
</div>
3336

3437
The application does not restart automatically when you change the code. For your changes to appear in the Space, you need to use the `Refresh` button that will restart the app.
3538

@@ -38,6 +41,17 @@ The application does not restart automatically when you change the code. For you
3841
You will need to manually run `pip install` from VS Code or SSH.
3942
</div>
4043

44+
### SSH connection and VS Code
45+
46+
The Dev Mode allows you to connect to your Space's docker container using SSH.
47+
48+
Instructions to connect are listed in the Dev Mode controls modal.
49+
50+
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.
51+
Check out the [Git over SSH](./security-git-ssh#add-a-ssh-key-to-your-account) documentation for more detailed instructions.
52+
53+
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.
54+
4155
### Persisting changes
4256

4357
<div class="alert alert-warning">
@@ -58,33 +72,35 @@ git push
5872
The modal will display a warning if you have uncommitted or unpushed changes in the Space:
5973

6074

61-
![image/png](https://cdn-uploads.huggingface.co/production/uploads/5fcfb7c407408029ba3577e2/r6Uk1YyvE2-hzsKTSRvnR.png)
62-
75+
<div class="flex justify-center" style="max-width: 550px">
76+
<img class="block dark:hidden !m-0" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/spaces-dev-mode/dev-mode-controls-uncommitted.png" alt="screenshot of the dev mode controls interface."/>
77+
<img class="hidden dark:block !m-0" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/spaces-dev-mode/dev-mode-controls-uncommitted-dark.png" alt="screenshot of the dev mode controls interface."/>
78+
</div>
6379

6480
## Enabling Dev Mode
6581

6682
You can enable the Dev Mode on your Space from the web interface.
6783

6884
<div class="flex justify-center" style="max-width: 550px">
69-
<img class="block dark:hidden !m-0" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/TODO.png" alt="screenshot of the dev mode toggle from the contextual menu."/>
70-
<img class="hidden dark:block !m-0" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/TODO-dark.png" alt="screenshot of the dev mode toggle from the contextual menu."/>
85+
<img class="block dark:hidden !m-0" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/spaces-dev-mode/dev-mode-enable-contextual.png" alt="screenshot of the dev mode toggle from the contextual menu."/>
86+
<img class="hidden dark:block !m-0" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/spaces-dev-mode/dev-mode-enable-contextual-dark.png" alt="screenshot of the dev mode toggle from the contextual menu."/>
7187
</div>
7288

7389
<div class="flex justify-center" style="max-width: 550px">
74-
<img class="block dark:hidden !m-0" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/TODO.png" alt="screenshot of the dev mode toggle from the Space settings."/>
75-
<img class="hidden dark:block !m-0" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/TODO-dark.png" alt="screenshot of the dev mode toggle from the Space settings."/>
90+
<img class="block dark:hidden !m-0" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/spaces-dev-mode/dev-mode-enable-settings.png" alt="screenshot of the dev mode toggle from the Space settings."/>
91+
<img class="hidden dark:block !m-0" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/spaces-dev-mode/dev-mode-enable-settings-dark.png" alt="screenshot of the dev mode toggle from the Space settings."/>
7692
</div>
7793

7894
<div class="flex justify-center" style="max-width: 550px">
79-
<img class="block dark:hidden !m-0" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/TODO.png" alt="screenshot of the dev mode toggle from the Space logs."/>
80-
<img class="hidden dark:block !m-0" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/TODO-dark.png" alt="screenshot of the dev mode toggle from the Space logs."/>
95+
<img class="block dark:hidden !m-0" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/spaces-dev-mode/dev-mode-enable-logs.png" alt="screenshot of the dev mode toggle from the Space logs."/>
96+
<img class="hidden dark:block !m-0" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/spaces-dev-mode/dev-mode-enable-logs-dark.png" alt="screenshot of the dev mode toggle from the Space logs."/>
8197
</div>
8298

8399
You can also create a Space with the dev mode enabled:
84100

85101
<div class="flex justify-center" style="max-width: 550px">
86-
<img class="block dark:hidden !m-0" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/TODO.png" alt="screenshot of the dev mode toggle from the Space creation page."/>
87-
<img class="hidden dark:block !m-0" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/TODO-dark.png" alt="screenshot of the dev mode toggle from the Space creation page."/>
102+
<img class="block dark:hidden !m-0" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/spaces-dev-mode/dev-mode-creation-enable.png" alt="screenshot of the dev mode toggle from the Space creation page."/>
103+
<img class="hidden dark:block !m-0" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/spaces-dev-mode/dev-mode-creation-enable-dark.png" alt="screenshot of the dev mode toggle from the Space creation page."/>
88104
</div>
89105

90106

0 commit comments

Comments
 (0)