[Python] Is it possible to build an apptainer from a sandbox directory with a conda env in a...

Discussão em 'Python' iniciado por Stack, Outubro 5, 2024.

  1. Stack

    Stack Membro Participativo

    I have built an apptainer sandbox directory in which my program works correctly. However, the only way to get it to work properly was to use a conda env. This is because some python modules would only install properly with conda, and the main program only worked correctly with python=3.9. So, I installed conda in the sandbox, created the conda env with python=3.9, and installed the program in that env. Now I want to convert the sandbox directory to a .sif file so I can run the program as a single command.

    Based on this answer and this guide, it seems that I can build the apptainer with the conda env by exporting the .yml file and providing it in the .def file under %files and then acitvating it under %post. However, the problem is, I want to do this directly from the sandbox directory, rather than having to write a whole .def file that will reproduce my sandbox directory, as the installation process was quite complicated.

    Is there any way to do that? Can I build a .sif file from a sandbox directory while also specifying my conda env .yml through a .def file?

    Continue reading...

Compartilhe esta Página