Versions Compared

Key

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

It may be advantageous or necessary to do data analysis without a connection to SLAC. Below are the steps to install psana along with the data to be used in the analysis onto a local machine for later, offline use on a RHEL 5, 6 or 7 machine. In the simplest case, a single conda environment is maintained but multiple conda environments can be created and used if necessary. The steps for both cases are shown below.

Table of Contents

Installation of a Single Conda Environment

...

Installation of Multiple Conda Environments

More information on managing Conda environments can be found here. Begin by following the steps above for the single environment but do not set the environment variables (i.e. step 10). It is recommended to have these variables set when the environment is activated and unset when deactivated. First create the environment with conda --create <environment name> -c lcls-rhel<num> psana-conda where <environment name> is the name of the environment to be created and <num> is the RHEL version. Then follow the steps below, for a given environment testenv, which were pulled from the link given before.

  1. Change directories to the environment directories like cd ~/miniconda2/env/testenv (the actual path may be slightly different but it will be under env in the conda package
  2. Create the following directories and files:
    1. mkdir -p etc/conda/activate.d
    2. mkdir -p etc/conda/deactivate.d
    3. touch etc/conda/activate.d/env_vars.sh
    4. touch etc/conda/deactivate.d/env_vars.sh
  3. Add the following to this files
    1. To etc/conda/activate.d/env_vars.sh: 

       

      Code Block
      #!/bin/sh
      
      export SIT_DATA=$HOME/psdm/data
      export SIT_PSDM_DATA=$HOME/psdm
    2. To /etc/conda/deactivate.d/env_vars.sh:

      Code Block
      #!/bin/sh
      
      unset SIT_DATA
      unset SIT_PSDM_DATA

 

Now testenv will have the correct environment variables when activated. And packages may be added, removed, upgraded, downgraded, etc. from this conda environment like usual. For information on this, follow link given at the beginning of this section.

Example

Example here.

 

 

 

cd /home/jsmith/anaconda3/envs/analytics