VSCode - jniedzie/SVJanalysis_wiki GitHub Wiki
We recommend that you use VSCode. You can download VSCode here: https://code.visualstudio.com/download
The steps below explain how to connect to the T3 with VSCode.
Add these lines to your ~/.ssh/config
file on your laptop, replacing <user>
by your T3 username.
Host t3ui01.psi.ch
HostName t3ui01.psi.ch
User <user>
Host t3ui02.psi.ch
HostName t3ui02.psi.ch
User <user>
Host t3ui03.psi.ch
HostName t3ui03.psi.ch
User <user>
Connect to the T3 in a terminal, go to where you installed the FW:
cd ~/SVJanalysis
Put these lines in a file called svj_analysis.code-workspace
:
{
"folders": [
{
"path": "."
}
],
"settings": {
"python.defaultInterpreterPath": "/work/fleble/anaconda3/envs/svj14/bin/python",
"python.analysis.extraPaths": [
".",
"./utilities",
"./utilities/histogramUtilities",
"./utilities/awkwardArray",
"./MLFramework",
"./MLFramework/module",
"./limitsProducer"
],
}
}
Replace /work/fleble/anaconda3/envs/svj13/bin/python
by your own Python installation if you have any.
Now:
- Open VSCode
- Install the
Remote Explorer
extension - Open the
Remote Explorer
extension in the left hand-side panel and click on the small window next tot3ui01.psi.ch
. If you overlay the mouse on it, it dislaysConnect in New Window
. - Enter your password, the new window is now connected to the T3.
- In the menu bar, click on
File
and thenopen Workspace from File
. Browse to open~/SVJanalysis/svj_analysis.code-workspace
. - Type your password again, and the new window should now be connected to the repository.
- Close the window and open a new empty VSCode window.
- Below
t3ui01.psi.ch
you should now seesvj_analysis (Workspace)
. Click on the small window toConnect in New Window
. This automatically opens the repository (after your enter your password).
If not already done, to avoid entering your password all the time, follow instructions here: Password-less ssh setup.
Install the following extensions:
- Python
- Pylance
- Python Debugger
- isort
- Jupyter
- Jupyter Notebook Renderers
- LaTex Workshop
- LTex - LanguageTool grammar / spell checking
- ROOT file viewer
- vscode-pdf
This has to be done on the remote server.
You can also install the extensions you want locally on your laptop!
Type F1 and search for Remote-SSH: Settings
.
There set the Max Reconnection Attempts
to 1.
In case you loose internet connection, VSCode will automatically try to reconnect and after 3 failed attempt, your IP will be banned from the T3. This configuration change is to avoid that this happens!