Coder Social home page Coder Social logo

Comments (2)

ShadHOH avatar ShadHOH commented on June 21, 2024 1

Hi lianos,

I appreciate the suggestion. I have attempted something similar before but was quick to find out that connecting directly to compute nodes was generally not possible and otherwise heavily discouraged as it bypassed the slurm resource allocation step. I have since spoken to the people operating the server, and was told that increasing capacity would be their preferred solution. For future people having a similar problem, I have also encountered this stack overflow thread which may prove helpful for someone else

from vscode-r.

lianos avatar lianos commented on June 21, 2024

I'm not going to use the right lingo here, but I also have a problem related showing plots under a similar situation that you are in, but I wonder if what I'm doing in order to get VS Code to connect to a private compute node through a public head node so I can do some R work on the private server can work for you, too?

My setup was inpsired by this stackexchange post.

My Setup

I currently ssh into a head (public) node and have to hop over to a node on an internal/private compute cluster. One difference between our setups is that I don't go through something like slurm to get a compute node, but I can rather specify which compute node (by IP) to then tunnel in to from the head node.

I've setup my ~/.ssh/config file in such a way that allows me to simply ssh into the head node, or hope in to an internal compute node easily. It looks something like this:

Host head-node
	HostName XXX.XXX.XXX.XXX
	IdentityFile ~/.ssh/id_rsa
	User steve

Host compute01
	HostName <internal IP address or computer name>
	IdentityFile ~/.ssh/id_rsa
	User steve
	ProxyJump head-node

Host compute02
	HostName <internal IP address or computer name>
	IdentityFile ~/.ssh/id_rsa
	User steve
	ProxyJump head-node

The same private ~/.ssh/id_rsa key is on all three of the nodes listed above.

With that setup, I can use the terminal to ssh into any of those nodes with a one liner

$ ssh head-node # connects me direct to the public/head n ode
$ ssh compute01 # hops through the head node and connects me to the compute node

In VS Code, I can then invoke the Remote SSH: Connect to Host... command and also connect to compute01 in the same way. The R terminal that then gets fired up within VS Code is running on the compute01 server.

Your Use Case

It's more of a PITA for you, since you need to modify your ~/.ssh/config file each time to update with the IP of the new compute node you've been assigned, but if you can manually ssh into the compute node you've been provisioned from the head node, perhaps this can also work for you?

from vscode-r.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.