Closed cscjlan closed 5 months ago
@cscjlan Thanks for the feedback!
I would like to add more details to the cotainr documentation about the options and limitations when installing pip dependencies in a conda environment using cotainr. Basically, anything that is possible to install from a pip requirements.txt file on the host file system should also be possible to install in a container using cotainr. Since most of what can be achieved when installing conda/pip environments using cotainr is limited by what can be achieved by conda and pip, I would like not to go too much into detail in the cotainr documentation and only cover the basics and then the details that are specific to Singularity/Apptainer and/or cotainr. This ssh agent forwarding problem, your are describing, is a good candidate for inclusion.
You are more than welcome to create a PR yourself to add this to the cotainr documentation. Otherwise, I will try to collect a few more use cases and then update the documentation at some point. Also if you have more examples of such use cases of cotainr, where you need a few tweaks/workarounds to make them work, I would love to hear more about them.
I just started using cotainr on friday so I don't have any more particular tips or tricks, but if I encounter any, I'll let you know!
I'll create a PR to update the documentation.
Edit: Here's the PR.
Thanks for taking the time to do this. We will look at the PR.
We have merged the PR and will close the issue.
It seems as though it's possible to use private github repositories with
pip
in the conda environment file only if one uses ssh-agent forwarding. This is because apptainer can use keys from the host ssh-agent but not from the host filesystem.It would be useful to mention this in the documentation, even though it's not related to cotainr per se, but rather to apptainer.
An example conda environment file, where the
foo/bar.git
is a private repository. This only works, if the host machine uses ssh-agent forwarding.This was tested on LUMI with
cotainr/2023.01.0-cray-python-3.9.12.1