This document explains the basics of installing submit.py, specifically, into a CIPRES environment. See readme.pdf for detailed explanations of various config files. # Basic Requirements # CipresSubmit requires the following: * Python 2.7 * PyXB 1.2.3 (Other versions will require regeneration of resource.py, only 1.2.2 and 1.2.3 are tested.) * pystache 0.5.3 (Only tested on 0.5.3, but the API seems stable enough.) It is up to you how you make these available to CipresSubmit, but the following sections explain how to bootstrap a Python installation or virtual installation on systems where the user is unprivileged. # Setting up Python # You probably don't have admin privileges on remote resource systems. However, we will need to install some Python libraries. You can either use virtualenv to create a virtual Python installation with your own modules installed in it, or you can do a complete installation. ## Setting up a complete Python ## If you have Python on your system, you can skip this step. TODO: Write this? ## Installing virtualenv ## If you have virtualenv installed, you can skip this step. If you don't want to install virtualenv, or can't, you can go to the step "Using a self-contained installer" ### Using pip ### Now, if you have pip installed, and on the path (either your own, or a system provided one) you can do: >pip install --user virtualenv OR >~/.local/bin/pip install --user virtualenv ## Creating a virtualenv ## You should probably create a virtual Python installation for CipresSubmit. virtualenv creates a virtual python installation that can have its own separate packages directory, but still benefit from site-wide package installations. It creates a file hierarchy that looks like a Python installation: /where/to/create/virtualenvironment/bin /where/to/create/virtualenvironment/lib /where/to/create/virtualenvironment/lib/site-packages That new environment will contain the pip installer and other necessary tools. NOTE: When you use the pip from a virtualenv, you should NOT use the "--user" option. ### Using a self-contained installer ### virtualenv has a self-contained installer avaliable at: https://pypi.python.org/packages/source/v/virtualenv/virtualenv-1.10.1.tar.gz When untarred, that will contain a file named: virtualenv.py With the correct (2.7) Python binary, run: >python virtualenv.py /where/to/create/virtualenvironment ### Using an installed virtualenv system ### If you have a modules based environment, load the latest Python: >module load python Then, in any case: >virtualenv /where/to/create/virtualenvironment # Installing Dependencies # Now, install the required packages for CipresSubmit into the virtualenv you created earlier. /where/to/create/virtualenvironment/bin/pip install -r /scripts/CipresSubmit/requirements.txt # Installing the program # CipresSubmit is included in the CIPRES sdk repository at /scripts/CipresSubmit To install via file-copy (instead of using the installer) simply copy the contents of the /scripts/CipresSubmit/src/* to someplace on your path, such as the CIPRES scripts directory: ## Installing via PIP (Preferred) ## From the directory with "setup.py", run: >pip install . ## Installing via copy/paste ## Copy the contents of the "src" directory to some directory on your path. >cp -r ..../scripts/CipresSubmit/src/* .../target/directory # Setting up .rc files # The Cipres SDK properties file used for building the SDK contains properties for an .rc file to be sourced when connecting to remote resources. These files are specified in the appropriate SDK .properties file, for example: teragrid.gordon.rc=/project/ps-ngbt/home/cipres/.bash_profile Edit this (or create a new) .rc file to: * Load the Python module if your environment is module based. * prepend the Python virtualenv to the path: export PATH=/where/to/create/virtualenvironment/bin:$PATH