Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide a way to open remote *.ipynb files when running VS Code locally and connected to remote Jupyter server #5904

Closed
ch3rn0v opened this issue May 16, 2021 · 3 comments
Labels
info-needed Issue requires more information from poster

Comments

@ch3rn0v
Copy link

ch3rn0v commented May 16, 2021

Environment data

  • VS Code version: 1.56.2
  • Jupyter Extension version (available under the Extensions sidebar): v2021.6.832593372
  • Python Extension version (available under the Extensions sidebar): v2021.5.842923320
  • OS (Windows | Mac | Linux distro) and version: Ubuntu 20 (both on the client and the server)
  • Python version: 3
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): conda
  • Jupyter server running: Remote

Expected behaviour

I can connect to a remote jupyter server.
I can open a remote .ipynb file, edit and save it. I can run it using a kernel that was automatically started on the remote jupyter server when I open the file (if the kernel used for this file was already running, ask whether the user would like to reconnect to the existing kernel).

Actual behaviour

I can connect to a remote jupyter server.
I can connect to an already running kernel (setting a variable using vs code and reading its value via other interface works as expected).
I can initiate a new kernel (or even a couple, not sure which actions lead to that though).
I can not open remote .ipynb file.
No way to test whether I can edit, save or run it.

Steps to reproduce:

  1. Run a remote jupyter lab instance, copy the token it provides.
  2. Enable port forwarding (so that accessing jupyter-lab's web interface is possible via localhost:port)
  3. Connect to jupyter's server using the token.
  4. Try to open a remote .ipynb file. The default file opening way doesn't work for obvious reasons, but there is no alternative.

Is there any way I can access a remote file? Thanks in advance.

@ch3rn0v ch3rn0v added the bug Issue identified by VS Code Team member as probable bug label May 16, 2021
@joyceerhl
Copy link
Contributor

Is there any way I can access a remote file?

If you can SSH into the remote host running JupyterLab, then you can achieve this by using the Remote-SSH VS Code extension: https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-ssh This extension will essentially allow you to interact with the files on your remote host as though they were present locally and connect to the Jupyter server for executing notebooks. However, you won't be able to interact with your local filesystem in the same VS Code instance.

We don't currently provide a way to access the remote filesystem outside of the Remote-SSH experience. If Remote-SSH isn't an option for you, how would you expect to be able to open a remote file while running VS Code locally? This would then be a feature request.

@joyceerhl joyceerhl changed the title Command Open in Notebook Editor does nothing Provide a way to open remote *.ipynb files when running VS Code locally and connected to remote Jupyter server May 16, 2021
@joyceerhl joyceerhl added enhancement info-needed Issue requires more information from poster and removed bug Issue identified by VS Code Team member as probable bug labels May 16, 2021
@ch3rn0v
Copy link
Author

ch3rn0v commented May 16, 2021

@joyceerhl , thanks a lot for you rapid response!
Perhaps your suggestion to use Remote-SSH is the proper solution to my question.

However, since I can connect to a remote jupyter's server, a remote kernel that it runs, it just feels natural to be able to open, edit, save and run remote notebooks. Whether this is a reasonable feature request for this project or Remote-SSH is enough is a question.

@rchiodo
Copy link
Contributor

rchiodo commented May 18, 2021

Dupe of #1366

@rchiodo rchiodo closed this as completed May 18, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

3 participants