Connection to an instance via ssh and VS-Code for Debugging with proper GPU Support

Esra Lenz

Hi, I want to connect to an instance with GPU support and then connect via SSH with my VS Code to establish a VS Code tunnel for debugging (using the VS-Code-Debugger). The cloud workstation (when started with GPU instances) does not have the same CUDA version as the Jupyter Notebooks. I am unable to create a running instance of the Notebooks that I can SSH into from my terminal. Additionally, no data is mounted, which I need for loading MRI files during debugging. What is the best container/app with the same CUDA version and mounted data that allows SSH connections via terminal where it is possible to define the IP.

Commands:
dx run jupyternotebook --allow-ssh → This not possible

dx run cloud_workstation --allow-ssh → Works, but doesnt have the same setup as the notebooks and is therefor not helpfull for debugging.

 

GOAL:

SSH-Connection to VS-Code to run the Code via SSH-Tunnel so I have my IDE and a proper Debugger. This should have the same setup as the jupyter-notebooks I will finally run the debugged code in. 

 

Hope somebody can help.

Comments

5 comments

  • Comment author
    Hang Yuan

    Hey Esra, I don't think creating ssh tunnel will be possible on RAP. 

    That's why they've have Jupyter notebook and Rstudio installed for people to use.

    Having IDE for Python is an important feature request for the UKB RAP but I don't think we have a solution to this yet sadly.

    1
  • Comment author
    Esra Lenz

    Hello Hang,

    I managed to do it with the cloud_workstation but so far not with the jupyter-notebooks. It just feels a bit off to reinstall some drivers for the GPUs (which I havent tried yet though) and not use the mounted directory that they provide in the jupyter_notebooks. Because with the Cloud-Workstation I was able to build a ssh tunnel and use my IDE and debugg with it. 

    So my workflow with that is:

    1. dx run cloud_workstation --allow-ssh --instance gpu_type

    2. Get the address and the host → Put it in my Vs-Code-Remote Desktop

    3. Install the stuff that I need and dx download a subsample with all the data that is needed. Get my code from github via zipped file and unzip it. Run the code.

    But it feels very inefficient to do that and I think a ssh tunnel to the instance with the running jupyter should just be allowed and I am wondering if there is a way to allow it somehow. Because in the Cloud_Workstation it is possible anyways to also run code just with much more effort. 

    Let me know what you think about this approach :) 

    0
  • Comment author
    Hang Yuan

    Hey Esra,

    What you've just described is already much more advanced than our ML workflow here. We have only worked with the notebooks via the RAP GUI. 

    If my understanding is correct, you will have to reinstall dependencies every time you start a cloud workstation? If SSH with the notebooks instances is allowed, it will be easier to manage some dependencies at least? 

    I mean there are overheads with the notebook instance as well lolol. 

    0
  • Comment author
    Esra Lenz

    Yes. But I have to do this with the Jupyters too if I am not using a Snap-Shot. But the worst part is the dx-download and the GPU-driver/CUDA-Version that is not the same as the one in the Jupyter which has an effect on my dependences. 

    Overhead is the word of the year for RAP. :D 

    1
  • Comment author
    Hang Yuan

    Lolol this is just very embarrassing hopefully with the new CTO they are hiring, things like these can be fixed.

    1

Please sign in to leave a comment.