I am looking for a way to manage the packages and resources needed for different coding projects. I'm not sure that this is the correct place to ask this question but couldn't find a place that perfectly seemed to fit, so please redirect if appropriate.
Essentially, I work on a lot of different projects, primarily in Python but sometimes in C++. I currently work on Ubuntu Linux. Each of these projects requires language specific packages, but also occasionally some operating system-wide resources (such as GPU drivers, etc.) I frequently run into a lot of trouble due to conflicting inter-dependencies, package updates, etc. I'd like a way to a associate all of the relevant files, packages, and a coding environment for each project and isolate them such that I can put the operating system in a state to run each project when necessary and deactivate it when unnecessary.
I understand there are some resources that exist for this. I have found that python or anaconda environments don't work that well because they are only able to deal with python-specific packages. I could create a separate virtual machine for each project, but this seems like overkill and would be a large resource allocation. I don't fully understand what a Docker container or Kubernetes is, but perhaps these are the solution I'm looking for.
In short, what system do you recommend using for keeping all of the necessaries for working on a project in a clean, isolated container that can be deactivated and activated as necessary to avoid conflicts?