当前位置:网站首页>Using slurm cluster computing node debugger in vscode

Using slurm cluster computing node debugger in vscode

2022-06-21 12:55:00 Challow

problem

The problem is vscode When debugging in the cluster, you cannot automatically enter compute node, But stay in login node

  • Suppose you have passed vscode Remote connection server

Solution

  • 1 Through the command ssh To the cluster ssh cluster
  • 2 In the cluster authorized_keys add to Local laptops or desktops Of public key
    • (windows The path of the system is C:\Users\yourusername\.ssh\id_rsa.pub , If not, you can pass through the terminal ssh-keygen -t rsa Command to generate , Just press enter )
    • ( In the cluster authorized_keys stay ~/.ssh/authorized_keys
  • 3 Get computing resources from the cluster , That is to ensure that you are under the login node ssh gpunode Was a success
  • 4 Get the name of the computing node , Let's say it's gpunode
  • 5 edit Local laptops or desktops Of config file
#  Name the login node casually 
Host loginnode
	#  Of the login node  ip
    HostName 127.0.0.1
    #  The user name of the login node 
    User lihua 
    #  Of the login node   port 
    Port 22
#  The name of the computing node can be chosen randomly 
Host computenode
	#  there  name  It is you who can pass through at the computing node  ssh gpunode Direct entry 
    HostName gpunode
    #  The user name of the login node 
    User lihua
    #  Login node name , Keep up with the above 
    ProxyJump loginnode

Then you can connect directly to the computing node locally ! In this case, there is no debug It is still the trouble of logging in to the node

Conclusion

If you have any questions, please leave a message , If you can, please give me a favor ~~(#^.^#)

Reference link

https://stackoverflow.com/questions/60141905/how-to-run-code-in-a-debugging-session-from-vs-code-on-a-remote-using-an-interac

原网站

版权声明
本文为[Challow]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/172/202206211219055053.html