I'm trying to use conda for packaging dependencies and environment creation for python packages. However, I have a hard restriction that I have to do this in environments that are offline and can't go into conda-forge to grab the dependencies during the conda package installation.
So the solution that I've currently come up with is in an environment that has access online, I will create a conda environment and install my conda package along with its dependencies. I've set my .condarc so that the pkg_dirs is set to "./pkgs/win-64". This way the dependency package .tar.bz2 files are captured in that directory. I then zip up the contents of the "./pkgs/win-64" to a file called condaPkgDependencies.zip and pass that to the environments that are offline and don't have access to conda-forge. I extract the condaDependencies.zip to some folder path. And then I run conda index (https://conda.io/projects/conda-build/en/latest/resources/commands/conda-index.html) to create a local channel and point to that local channel when trying to run the conda install on that offline environment.
I was wondering if there was a much cleaner way of handling for this. If I use the default pkg_dirs location I believe that ALL dependencies are stored there so packaging up the default location will contain some conda dependencies I do not need.
I've also looked at https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#sharing-an-environment but I don't think this solves my issue of packaging up dependencies for offline mode installation.
Here is what I've added to my .condarc
pkgs_dirs: - ./pkgs/win-64