Hi Michał,
Non-SWAN maintainer here. Just to say that, yes, the environment startup script can literally do anything. If it takes much longer than 60s you find that the startup of the SWAN environment is unreliable so I have in the past backgrounded tasks in the script to avoid this.
Personally however, if I had the same requirements as you described, I would enforce a single command at the start of every notebook which did the tasks that you require. This way it is very explicit, and there is no risk that the user forgets to include the environment startup script when starting up SWAN (plus you can use a standard SWAN environment without having to restart it in order to do this analysis).
I posted a few weeks back an example of doing precisely this for package installation into a directory that was not .local
. The same technique applies for each of the requirements you have listed (pip install stuff, force a pip upgrade of specific thing, clone a repository). Avoiding the use of ``--user`` and ``.local`` for pip installations
Anyway, hope this helps. Again, just a reminder - I’m a fellow user, not a developer/maintainer of SWAN, so please don’t take my word that this is the recommended approach.
Cheers,
Phil