I have encountered opinions that using conda-lock gives a very accurate environment snapshot, but sometimes the high degree of accuracy may lead to incompatibility, because some (I assume) low-level dependencies captured using the lock file may be platform-specific.
Are there any best practices in this regard? Has anyone had any issues with transferring locked Conda environments from Windows to Linux or from one Linux distribution to another Linux distribution, etc.?
Conda-lock's default output - the unified lockfile - is multi-platform. For example, one can create a multi-platform lockfile using the
--platform, -p
argument (see CLI reference):Alternatively, one can use the nonstandard key
platforms:
in the initial specification file shown in this example, or briefly:There is no such equivalent option for standard YAML outside of omitting build strings and keeping specifications generic.