Using VS Code with custom containers on Baobab

Hello all,

I am using VS Code (1.58.2) to ssh into Baobab. For my daily use cases, I use several singularity containers for different projects. Is there a way to get VS Code to recognize the python interpreter for the python installed in the singularity image?

I found one thread (here) which sort of explains how to get it working for one, but is there to way to go about this generally so that I don’t have to do this for all the singularity images everytime I use one?

Cheers,
Deb

Hi there,

It is not clear what you are trying to do all, let me try to rephrase it.

You have multiple projects using each one a different Singularity image and from VS Code on your local machine you want to do all the coding stuff and testing it with the correct Singularity image. Is this right?

First, let me state that IMHO this seems over-convoluted, given that you are mixing a lot of stuff (SSH, containers, Python version, etc.).

A quick&dirty solution would be the following, which requires two components:

  1. I do not use VS Code, thus I do not know if it is possible to associate metadata to each project, ideally base on the folder you are. In this case, at least VS Code will know the Singularity image name you need.
  2. you should write a wrapper on the HPC clusters that you call upon an SSH connection and that start the Singularity image using the name VS Code knows.

Finally, please note that this goes beyond the support that we provide.

Thx, bye,
Luca