I would like to have two environments: a production environment that is a strict subset of a testing environment. How can I achieve this using Conda (or micromamba)?
Testing requires some extra utilities that don't need to be bundled in the production docker image. The main idea is to ensure that the sub-dependencies in the production install are the exact same versions as were tested in the companion environment.
Example possibilities:
- Is there an option to specify a constraints file (like for pip) that can include more packages than are currently being installed (and a way to populate this file from the test env, to use when creating the prod env)?
- Is there some way to limit conda to only retrieving packages from a local cache that was freshly populated by the install of a previous env?
- Is there an option to install the additional (testing) requirements while forcing conda not to upgrade/downgrade any existing packages in the environment? (But basing the test env from a duplicate of the prod env in this manner may make it impossible to satisfy version conflicts..)