The instructions for creating persistent environments in tike_content/content/extra-software.md do not work consistently due to restrictions on cross-device hardlinks (and of course they wouldn't be a good idea anyway, nor would symlinks, because the linked objects would disappear on the subsequent launch). Conda's fallback copying will usually work eventually, but the check-and-fall-back process is pretty slow, could take hours for large environments, and in some cases will fail. The usual remedy for this type of issue is to use the --copy
argument to conda create
, and I suggest you include that in extra-software.md. It is still slow, but will generally be more consistent and faster than going through the attempted hardlink process. Note that conda-env
will not accept this argument, so this method cannot be used to create a persistent environment from an environment definition file.
Example snippet of errors (a typical environment will create hundreds of thousands):
src: /opt/conda/pkgs/libdb-6.2.32-h9c3ff4c_0/include/dbstl_inner_utility.h
dst: /home/jovyan/local_envs/fornax-slice-testing/include/dbstl_inner_utility.h
DEBUG conda.gateways.disk.create:create_link(363): OSError(18, 'Invalid cross-device link')
DEBUG conda.gateways.disk.create:create_link(364): hard-link failed. falling back to copy
error: OSError(18, 'Invalid cross-device link')
src: /opt/conda/pkgs/libdb-6.2.32-h9c3ff4c_0/include/dbstl_map.h
dst: /home/jovyan/local_envs/fornax-slice-testing/include/dbstl_map.h
DEBUG conda.gateways.disk.create:create_link(363): OSError(18, 'Invalid cross-device link')
DEBUG conda.gateways.disk.create:create_link(364): hard-link failed. falling back to copy
error: OSError(18, 'Invalid cross-device link')
src: /opt/conda/pkgs/libdb-6.2.32-h9c3ff4c_0/include/dbstl_resource_manager.h
dst: /home/jovyan/local_envs/fornax-slice-testing/include/dbstl_resource_manager.h
DEBUG conda.gateways.disk.create:create_link(363): OSError(18, 'Invalid cross-device link')
DEBUG conda.gateways.disk.create:create_link(364): hard-link failed. falling back to copy
error: OSError(18, 'Invalid cross-device link')
src: /opt/conda/pkgs/libdb-6.2.32-h9c3ff4c_0/include/dbstl_set.h
dst: /home/jovyan/local_envs/fornax-slice-testing/include/dbstl_set.h
DEBUG conda.gateways.disk.create:create_link(363): OSError(18, 'Invalid cross-device link')
DEBUG conda.gateways.disk.create:create_link(364): hard-link failed. falling back to copy