I have set up a Conda environment on a regular machine. It works fine. I want to clone this environment on a machine that lacks Internet access (I can only SSH into it).
My initial thought was to just tarball the package cache that Conda leaves and move that to the appropriate place on the airgapped machine:
conda create --offline --use-local -n my_env pkg1 pkg2 pkg3 etc
This doesn't work. It complains that packages, or dependencies thereof, have incompatibilities amongst the collection I have moved on to this machine. Adding --force and/or --no-deps makes no difference.
What I would have liked to do is something like:
conda env create --offline --use-local -f EXPORTED_ENV.yaml -n my_env
...where EXPORTED_ENV.yaml is created on the regular machine, as -- at least anecdotally -- I think Conda just works with what it's given in this instance, rather than trying to resolve the dependency graph. However, env create doesn't have an --offline, --use-local, or --no-deps flag; and without, it insists on trying (and failing) to download the packages on the airgapped machine, even when they're sitting in the package cache.
Is there a way of forcing conda create to ignore conflicts or making conda env create install from the local cache?
(n.b., This question is similar, but it seems specifically to do with pip-installed packages, thus the accepted answer focuses on that as an alternative. My environment, however, is predominantly non-pip-based.)