planemo serve - Galaxy installation / startup time

Hi,

I am using planemo serve to spin up an temporary Galaxy instance for tool development. Currently this is the command:

planemo serve <tool.xml> --docker

It works great, i.e. the Galaxy instance does execute the tool in the specified docker container and dynamically updated changes I make to the <tool.xml>.

My problem is, that every time I execute the planemo serve command, Galaxy is installed from scratch. This takes about 15 minutes to build all modules and everything. I cannot figure out how to prevent this, my assumption is that this should be a one time task. I was experimenting with the --install_galaxy and --skip_client_build flags but without success (the later resulting is faster startup times, but the served web server does not show anything).

Has anyone experience with planemo serve?

Hi @Pascal

I think that is how it works in order to capture a specific/exact build for testing … but I also have done this in a while. Let’s ask the Admins at their chat. They may reply here or there, and feel free to join. https://matrix.to/#/!rfLDbcWEWZapZrujix:gitter.im/$r7HxZWwK2TkzkULA5t0BzuZEf8x1rlL8pvGmSIXOtVA?via=gitter.im&via=matrix.org

Ah, I think I found it.

See https://planemo.readthedocs.io/en/latest/commands/serve.html

--galaxy_root is probably what you are looking for. That could be your instance or some other hosted instance you have access to.

planemo will search parent directories to see if any is a Galaxy instance - but one can pick the Galaxy instance to use with the --galaxy_root option or force planemo to download a disposable instance with the --install_galaxy flag.

planemo will run the Galaxy instance in an existing virtualenv if one exists in a .venv directory in the specified --galaxy_root. Otherwise, the Galaxy instance will run in a clean virtualenv created in /tmp.

planemo uses temporarily generated config files and environment variables to attempt to shield this execution of Galaxy from manually launched runs against that same Galaxy root - but this may not be bullet proof yet, so please be careful and do not try this against a production Galaxy instance.

1 Like

Jep, --galaxy_root should do the trick, but it does not need to be “some other hosted instance”.

Just clone the main galaxy repository and checkout a desired release branch, then direct --galaxy_root to this directory.

If this also does not work then call (./scripts/common_startup.sh) in the galaxy root directory once.

Would be great if you could report back if this worked, because im not 100% sure :slight_smile:

2 Likes

Thank you both. I was testing out the --galaxy_root and --install_galaxy flags before, but not correctly. I just used --install_galaxy without the --galaxy_root flag, but an installation to tmp won’t work. The trick is to initially specify both:

planemo serve <tool_folder> --galaxy_branch release_23.1 --install_galaxy --galaxy_root <install_dir>

And afterwards the following does use the already built instance:

planemo serve <tool_folder> --galaxy_root <install_dir>