galaxyproject / ansible-galaxy

An Ansible role for managing a Galaxy server
https://galaxy.ansible.com/galaxyproject/galaxy
58 stars 74 forks source link

Install miniconda and make virtualenv from conda #110

Open natefoo opened 4 years ago

natefoo commented 4 years ago

This would be pretty good to have for e.g. CentOS 7, where Python 3 may not be installed (or if it is, it may not be installed on the cluster). Having an option to use conda for Galaxy's venv/python would fix this.

rhpvorderman commented 3 years ago

@natefoo I was planning to take a shot at this. But how would this work with privilege separation?

Therefore if the virtualenv inherits from the conda python, the python in the virtualenv is essentially controlled by the galaxy user.

This poses a problem in the implementation. Unless we create a separate conda installation for both the privsep user and the galaxy user. But that seems like a big waste of space.

What is the preferred way forward here? I will have a look at https://docs.conda.io/projects/conda/en/latest/user-guide/configuration/admin-multi-user-install.html to see if this problem can be easily solved.

rhpvorderman commented 3 years ago

Appararently this is possible. I will try to implement something. Installing conda in /opt/conda and setting conda_exec in galaxy.yml to /opt/conda/bin/conda while keeping the same conda_prefix should do the trick. This requires conda_copy_dependencies: true to work. But that is not a big problem. I am currently working on installing galaxy in connection with slurm, so a configuration where all the necessary files are in the mutable data dir (on the cluster filesystem) is preferrable anyway.

My other angle is that galaxy containers are now produced with this ansible-galaxy role. I want to create a container with conda preinstalled. Having this available would be really nice. We could use such a container to test ephemeris better.