This repository may contain useful scripts for debugging on a remote cluster.
Note that we are using conda (e.g., mini-forge). If you do not want to use it, you can change the corresponding parts.
- Clone this repository into your current working repository, i.e., where you code cool stuff.
- Install
debugpy
andpath
. - In
.vscode/launch.json
:Add configuration
->Python
->Remote Attach
. You can add any host name and port number (we will configure this inconfig.conf
). You can removepathMappings
. Also remove comments. - Adapt configurations in
vscode_remote_debugging/config.conf
.
- Set up a script for debugging similar to
vscode_remote_debugging/run_debug.sh
. - Grab yourself a GPU, e.g.
swrap srun -p super_large_cluster --pty bash
. - Run
bash vscode_remote_debugging/init.sh
. - Run
bash vscode_remote_debugging/run_debug.sh
(might take a second to start). - Attach to the run via VSCode.
- Debug as if you were running the code on your local machine.