Galaxy on UPPMAX, simplified

This post is intended to be shortened over time, eventually becoming an automated procedure… a wiki-post from dahlo’s magic until upstream patches settle down. All commands are issued on the cluster, unless otherwise stated.

Please report any issues via comments !

  1. Firsly, follow my earlier post on how to setup your own python virtual environment on UPPMAX.
  2. Once you have a prompt similar to: (devel) hostname ~$, you can continue, else, jump to 1.
  3. pip install drmaa Mercurial PyYAML
  4. Add the following env variables to your .bashrc:
    export DRMAA_LIBRARY_PATH=/bubo/sw/apps/build/slurm-drmaa/lib/libdrmaa.so
    export DRMAA_PATH=$DRMAA_LIBRARY_PATH
    
  5. Create a file ~/.slurm_drmaa.conf with the contents:
    job_categories: {
          default: "-A <your project_account> -p devel"
    }
    
  6. hg clone http://bitbucket.org/brainstorm/galaxy-central
  7. Edit universe_wsgi.ini from the provided sample so that it contains:
    admin_users = <your_admin_user>@example.com
    enable_api = True
    start_job_runners = drmaa
    default_cluster_job_runner = drmaa://-A <your project_account> -p devel
    
  8. On your local machine: ssh -f <your_user>@<uppmax> -L 8080:localhost:8080 -N
  9. On your local machine: Fire up your browser and connect to http://localhost:8080

As a betatester you may expect some issues when running galaxy in that way. Firstly, keep in mind that it’ll not perform as fast as a production-quality setup, it’s just a developer instance. Furthermore the node you’re in might have time limit restrictions, meaning that your instance will be killed in 30 minutes if you don’t reserve a slot beforehand as Martin recommended on the section “Run galaxy on a node”.

How to install python modules with VirtualEnv… on UPPMAX

Why bother ?

Both virtualenv and virtualenvwrapper ease the hassle of managing python modules when one does not have root access on a system. In addition, no more “–prefix” flags are needed when installing modules. Or maybe better explained, from the official docs:

The basic problem being addressed is one of dependencies and versions, and indirectly permissions. Imagine you have an application that needs version 1 of LibFoo, but another application requires version 2. How can you use both these applications? If you install everything into /usr/lib/python2.7/site-packages (or whatever your platform’s standard location is), it’s easy to end up in a situation where you unintentionally upgrade an application that shouldn’t be upgraded.

Or more generally, what if you want to install an application and leave it be? If an application works, any change in its libraries or the versions of those libraries can break the application.

Also, what if you can’t install packages into the global site-packages directory? For instance, on a shared host.

In all these cases, virtualenv can help you. It creates an environment that has its own installation directories, that doesn’t share libraries with other virtualenv environments (and optionally doesn’t access the globally installed libraries either).

After this howto you’ll be able to create an isolated clean python environment where you can install as many python modules as you want and where your PYTHONPATH, PYTHONHOME and friends are not tainted… unless there’s a module system in the way, oh, my !

We’ll see how to tame that beast too. Keep reading.

Continue reading →