Multi Directory Workspace Dev Container setup in VS Code

43 Views Asked by At

I have two separate folders stats and libraries. Libraries contains a bunch of utilities that are shared amongst multiple projects and as such I don't want to put them under that stats project into a large monolithic structure. stats is my current main project that uses methods in the namespace library contained within libraries.

I would like in Visual Studio Code to have both folders in the same workspace with the ability to work in a remote dev container that has both directories (with the attached volumes) so I don't need to install other python dependencies locally.

I setup the workspace (add both folders to workspace), I think correctly (maybe not), but can't seem to get the dev container portion working. I has vscode generate the devcontainer.json. I have played with the devcontainer json file to no success using AI and other to try to get this to work.

When I try to launch the dev container it will open and launch stat (and correctly install python dependencies using pip, and set my PYTHONPATH, but libraries directory is missing.

Any help you can provide to this frustrated dev container beginner would be much appreciated.

Please see my simple directory example structure below.

├── libraries
│   ├── apis
│   │   ├── timezone
│   │   │   └── ipgeolocation.py
│   │   └── weather
│   │       ├── noaa.py
│   │       └── visalcrossing.py
│   ├── utls
│   │   └── date_utils.py
│   └── webscraping
│       └── scaper.py
└── stats
    ├── requirements.txt
    └── src
        └── main.py

Thank you.

0

There are 0 best solutions below