Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Updating existing packages is straightforward - however we will always build new conda environments with a bumped up version number before changing an existing package.

Presently, packages that can only be installed via pip are not being maintained in the central installs, but see the User Conda Envionments section below.

User Conda Environments

Without Psana

A great way to experiment with a new package is to create your own conda environment and install the package there (this is similar to using virtualenv - which doesn't seem to work with our conda installations). This will work fine for environments based on packages from continuum, conda-forge, etc. However if you want to create your own conda environment that includes LCLS software such as psana, or our local build of openmpi or hdf5 there will be issues. We recommend you look the Psana Developer Documentation to see if a psana test release will fit your needs. If not, here are some issues:For example, after doing

  source conda_setup

one could do, following conda – create an environment from the conda documentation (note, you need to be on a machine with outside interenet access like pslogin for the below command to work):

  conda create --name snowflake biopython

which installs biopythion from the the conda package that is maintained by anaconda. Note this is different then using pip. The nice thing about conda is that you can use pip to install packages in your conda environments. So for install, after creating your environment named snowflake, you could do

  source activate snowflake
pip install PyAbel

With Psana

Many users will want to use various python packages with psana. The simplest way to do this is to clone an environment that has psana in it. The steps are, from a rhel7 machine with outside internet access (i.e, pslogin)

source conda_setup
conda create --name myenv --clone ana-1.0.8  # or whatever environment conda_setup put you in
source activate myenv
pip install PyAbel

Now switch to machine with access to the data (i.e, ssh psana) and do

source conda_setup
source activate myenv

To work with the data and psana at the same time. 

Notes:

  • You cannot use your environment across rhel5, rhel6, and rhel7. You should only use it on rhel7. (Making three different environments named myenv-rhel6, myenv-rhel7 etc, won't work - they will all use the same psana-conda code
  • You cannot use your environment across rhel5, rhel6, and rhel7. All conda environments live in one place. You could create three environments, a myenv-rhel5, myenv-rhel6 and myenv-rhel7, however presently we do not include  rhel5/rhel6/rhel7 in our psana conda package names, consequently your three environments will all link to the same build of psana.
  • There are issues with the conda create --clone command (a natural way to extend an environment like ana-1.0.7), for instance, mpirun does not seem to be installed properly in the cloned environment
  • You need to define the environment variables SIT_ROOT and SIT_DATA for psana (look at the file /reg/g/psdm/sw/conda/inst/miniconda2-prod-rhel7/envs/ana-1.0.7/etc/conda/activate.d/env_vars.sh for an example of how).
  • The biggest issue, is that all 3GB of software in the LCLS conda environment will get copied into your home directory.

Supporting softlinks from user home directories to a central package repository is a feature under development at continuum. However even with this feature, before users can create their own conda environment with psana that they run cross platform, we will need to do some development.

Offsite Installation

You should contact us pcds-ana-l@slac.stanford.edu before attempting offsite installation. Steps are below, but they have not been tested so we expect issues to come up that we have to help resolveWe need to do development to automate this for users. Below is a recipe for manual installation to help users with offsite installation.

LCLS will maintain three channels in continuum:

...

On your offsite host computer, after activating create a conda environment that you want to put psana in, executenew environment for psana. Do the following:

conda create --name myenv  conda install -c lcls-rhel7 psana-conda

this should install the latest version of psana-conda, and its dependencies. Currently we are specifying strict dependencies for certain packages. Installing psana-conda will also install specific versions and builds of the following packages

...

that we maintain in lcls-rhel7. We can do development to relax this in the future if it is a problem - for instance you may be at a lab that has its own mpi installation.

You Before running psana, you will also need to set the environment variables SIT_ROOT and SIT_DATA as mentioned in the User Conda Environments section above..  The recommended way to do this is to have them set when your environment is activated, and unset when it is deactivated. Conda provides a mechanism to do this discussed here: saved-environment-variables. The complicated piece is that SIT_DATA must include the sub-directory 'data' to your conda environment, as well as where the experiment-db.dat file is. For instance, with a conda environment like ana-1.0.8, the files

  envs/ana-1.0.8/etc/conda/activate.d/env_vars.sh
and
envs/ana-1.0.8/etc/conda/deactivate.d/env_vars.sh 

read

  #!/bin/sh
export SIT_DATA=/reg/g/psdm/sw/conda/inst/miniconda2-prod-rhel7/envs/ana-1.0.8/data:/reg/g/psdm/data
export SIT_ARCH=x86_64-rhel7-gcc48-opt
export SIT_ROOT=/reg/g/psdm

and

  #!/bin/sh
unset SIT_DATA
unset SIT_ARCH
unset SIT_ROOT
export SIT_DATA
export SIT_ARCH
export SIT_ROOT

respectively (SIT_ARCH is only used for building psana software)

Programmatic Version Information

...