[FEEDBACK] Spaces Dev Mode

#3
by sbrandeis HF staff - opened
Dev Mode Explorers org

This discussion is dedicated to feedback about Spaces' Dev Mode feature.

Your feedback is really valuable so don't hesitate to share anything about it 🤗.

sbrandeis pinned discussion
Dev Mode Explorers org

a great feature ✨

Dev Mode Explorers org

The feature is excellent, but when I activate dev mode, it functions correctly on my end, but it consistently displays "preparing spaces" on the public page.

(Screenshot: Taken from incognito)
image.png

I have a PRO account, and can't connect via VSCode Local or Remote for this simple gradio space.

On the web, it's stuck in endless loading.

On local, I get a timeout error. I've verified that my ssh setup is correct by following the steps here

Dev Mode Explorers org

The feature is excellent, but when I activate dev mode, it functions correctly on my end, but it consistently displays "preparing spaces" on the public page.

Thanks for reporting @KingNish - we'll work on a fix for this soon

I have a PRO account, and can't connect via VSCode Local or Remote

Thanks for reporting @arsalagrey , unfortunately I cannot reproduce this behavior. Can you try again to confirm it still does not work for you?

It would be helpful if you could share more information about this issue, for example:

  • Can you SSH into the Space (using SSH, not VSCode) ?
  • Is there any error when you try to SSH into the Space?
  • Is there any error when you try to connect to the Space with your local VS Code?

When using VS Code local, make sure you have the Remote - SSH VS Code extension installed.

Dev Mode Explorers org

@KingNish the issue you reported should be fixed now, can you confirm it works as expected on your side?

Dev Mode Explorers org

@sbrandeis Yes, it's working fine. Thank you!

Disregard.

@bkoz

This is a great feature, but the modal blocks the Space's UI. Can you add a feature to minimize it?

Dev Mode Explorers org

This is a great feature, but the modal blocks the Space's UI. Can you add a feature to minimize it?

You can minimize it by clicking arrow above dev mode block.

I cannot see any arrow, please check attached screenshot.
devmode.png

Dev Mode Explorers org

I cannot see any arrow, please check attached screenshot.
devmode.png

I guess heres a 'whatever' issue,-> Arrow doesnt switch colors depending on dark/light mode?

Dev Mode Explorers org

cc @victor on the above ^

Dev Mode Explorers org

Yes it should :D

great feature

I have a PRO account, and can't connect via VSCode Local or Remote for this simple gradio space.

On the web, it's stuck in endless loading.

On local, I get a timeout error. I've verified that my ssh setup is correct by following the steps here

I'm getting related errors and cannot seem to get the local VSCode Connection to work.

Keep getting messages like:
"@ssh.hf.space: Permission denied (publickey).
local-server-1> ssh child died, shutting down

[21:57:53.411] Resolver error: Error: Permission denied (publickey)."

Dev Mode Explorers org

@NicDev make sure your ssh key is stored in your hf account

Yeah it is, i also follwed the ssh setup steps mentioned here

Edit: Maybe I should add to this, I found only some threads that were related to this issue.

https://github.com/microsoft/vscode-remote-release/issues/6521 --> Suggests to set "remote.SSH.useLocalServer": false; on my end, this makes the SSH connection request run veery long/endlessly, never finishes.
https://stackoverflow.com/questions/60675232/ssh-in-vscode-error-permission-denied-publickey-password --> is related to the config file, didn't help

Maybe also worth mentioning: It fails precisely after prompting me to insert the passphrase 3 times.

Hi,
I have had a problem recently that turned out to be Dev Mode-related:
Upon factory rebuild of my spaces, nothing installed from requirements.txt or packages.txt.
Just turning dev mode off solved it, and everything installed as it should upon rebuild. Also worked turning on dev mode again after that.

Hopefully it gets fixed, but if you have the same problem just turn off Dev Mode if you are rebuilding pushing changes to requirements.txt/packages.txt!

Oh never mind just found this on the dev-mode-explorers page:

If you're using the Streamlit or Gradio SDK, or if your application is Pyhton-based, note that requirements are not installed automatically. You will need to manually run pip install from VS Code or SSH.

So I guess it's expected, but not well documented I have to say! Works great anyway so thanks!

Hi everyone,
i wanted to try the dev mode, ultimately with the intention to streamline my dev flow using pycharm.
I set up the ssh key and can connect using the console.
It seems the ssh connection is working in pycharm (didnt get it to connect using termius, despite the log showing successfull authentication)
It seems the SFTP connection is failing.
To double check: Is the intention that file down- and upload is possible via SFTP to the space?

One thing I noticed is, that the "Git status" widget is not finishing:
image.png

Appreciate any input.
Thanks

Dev Mode Explorers org

It seems the SFTP connection is failing.

Hi @tengel , to upload files to your space we advise using rsync rather than SFTP. The SFTP protocol is not supported on our side.

didnt get it to connect using termius

Could you get some logs from the ssh connection from termius?

Appreciate your input @mcpotato , thanks.

@SFTP: thats a pity, pycharm would support it out of the box. I tried with the rsync option within pycharm, but it seems it still tries to use SFTP for authentication and rsync then for the data transfer. From the command line trying rsync fails as the remote side does not have to seem rsync available (logged in via ssh, tried to find it)

Any thoughts about adding SFTP support in the future?

@Termius log:
👤 Starting a new connection to: "ssh.hf.space" port "22"
⚙️ Starting address resolution of "ssh.hf.space"
⚙️ Address resolution finished
⚙️ Connecting to "18.205.32.140" port "22"
👤 Connection to "ssh.hf.space" established
⚙️ Starting SSH session
⚙️ Remote server: SSH-2.0-russh_0.43.0
⚙️ Agreed KEX algorithm: curve25519-sha256
⚙️ Agreed Host Key algorithm: ssh-ed25519
⚙️ Agreed server-to-client cipher: aes256-gcm@openssh.com MAC: INTEGRATED-AES-GCM
⚙️ Agreed client-to-server cipher: aes256-gcm@openssh.com MAC: INTEGRATED-AES-GCM
⚙️ Agreed client-to-server compression: none
⚙️ Agreed server-to-client compression: none
⚙️ Handshake finished
👤 Checking host key: 9a:11:8b:d7:f7:58:56:93:a4:d1:c3:c2:b0:81:86:aa
👤 Host "ssh.hf.space":"22" is known and matches
👤 Authenticating to "ssh.hf.space":"22" as "tengel-devmodetest"
⚙️ Available client authentication methods: publickey,password,keyboard-interactive
⚙️ Authentication that can continue: publickey
👤 Authenticating using publickey method
👤 Authentication succeeded (publickey)
👤 Authenticated to "ssh.hf.space":"22"

image.png
Surprisingly, the log does not even show the failed connection, only the GUI.

Dev Mode Explorers org

rsync fails as the remote side does not have to seem rsync available

Are you using a custom Dockerfile for your space? You must install rsync yourself if so. Otherwise, rsync should be installed by default in your space.

Any thoughts about adding SFTP support in the future?

It's complicated and would require some work to do so. If we have sufficient demand from the community we can think about it, otherwise no.

Hi everyone,

I've started a space using the docker template "jupyter-lab" and enabled dev mode. I'm using a local VS code.
When running my script on gpu, I can't find the PID with nvidia-smi.

This is perhaps related to this issue: --pid=host should be specified when running the docker container.

Any idea on how to solve this ?

image.png

Sign up or log in to comment