conda-pack
conda-pack copied to clipboard
Q: Programatically detect if 'conda-unpack' has already been executed?
On https://conda.github.io/conda-pack/ it says:
Once an environment is unpacked and
conda-unpack
has been executed, it cannot be relocated. Re-applyingconda-pack
is unlikely to work.
Is there a way to programmatically detect whether or not conda-unpack
has already been executed?
Hi there, thank you for your contribution!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed automatically if no further activity occurs.
If you would like this issue to remain open please:
- Verify that you can still reproduce the issue at hand
- Comment that the issue is still reproducible and include: - What OS and version you reproduced the issue on - What steps you followed to reproduce the issue
NOTE: If this issue was closed prematurely, please leave a comment.
Thanks!
ping
I'm interested in this functionality as well. What I've been doing is building a tarball with conda-pack and having all bash script utilities I place in it run conda-unpack
and write a <prefix>/.installed
file that contains the absolute prefix path. Then any future executions I check if the .installed
path doesn't match the current prefix I rerun conda-unpack
. However, as mentioned in the documentation, this doesn't actually update the files that were updated in the initial execution.
I wonder if conda-pack could bundle a "package data" file that serves the same purpose as my .installed
file. Theoretically this should give it all the information needed to know if it should run again. I think you could even use conda post-link scripts to create the initial version of this file with the conda environment's path: https://docs.conda.io/projects/conda-build/en/latest/resources/link-scripts.html